码迷,mamicode.com
首页 >  
搜索关键字:seek    ( 696个结果
Android--文件存储操作(一)
1、写入内置空间 output write2、写入SDCard卡 input read该文件指针可以通过 getFilePointer 方法读取,并通过 seek 方法设置。RandomAccessFile同时将FileInputStream和FileOutputStream...
分类:移动开发   时间:2015-12-06 17:25:42    阅读次数:258
python 文件MD5 SHA1校验计算
#coding:GBK#md5SHA1文件校验值计算#使用方法:python文件.py验证文件importhashlibimportsysimportosdefmd5_sum(filename):#校验值方法fd=open(filename,"rb")#打开文件fd.seek(0)#将文件打操作标记移到offset的位置line=fd.readline()#读取文件第一行进入line#md5校验值计算m..
分类:编程语言   时间:2015-11-30 18:25:51    阅读次数:200
python StringIO类
python的stringIO类用来处理字符串,由于其操作类似文件操作,可以视为内存中的文件。1.创建stringIO2.常用操作:write,writelines、getvalue、seek、readline、readlines>>> from StringIO import StringIO>>...
分类:编程语言   时间:2015-11-23 21:56:40    阅读次数:421
lseek()函数
lseek()有个特殊的用途,确定文件是常规文件还是设备。off_t currpos;ourrpos = lseek(fd, 0, SEEK_CUR);if (ourrpos == -1){ printf("this is drive file");}这种方法用来确定文件或者设备是否可以设置偏移量....
分类:其他好文   时间:2015-11-21 18:32:40    阅读次数:189
快速获取文件大小
功能简单,直接上代码unsigned long getFileSize(FILE* fp){ unsigned long cur_pos = ftell(fp); fseek(fp, 0, SEEK_END); unsigned long len = ftell(fp); f...
分类:其他好文   时间:2015-11-19 10:49:15    阅读次数:147
第六章课后作业
*6.24T_seek=3msT_maxrotate=60*1000/12000ms=5msT_avgrotate=0.5*T_maxrotate=2.5msT_transfer=T_maxrotate/500=0.01msT=T_seek+T_avgrotate+T_transfer=5.51ms
分类:其他好文   时间:2015-11-11 11:35:58    阅读次数:152
20135223何伟钦—信息安全系统设计基础第九周学习总结
学习目的:1. 掌握系统编程和系统调用的概念2. 掌握系统编程错误处理的方式3. 掌握Unix/Linux系统级I/O(open close read write seek stat)4. 掌握RIO5. 掌握I/O重定向的方法一、Unix I/OUnix I/O定义:所有的I/O设备都被模型化为文...
分类:其他好文   时间:2015-11-08 22:18:11    阅读次数:243
第十章I/O
系统级i/o开始进程时的三个标准:标准输入(描述符0):STDIN_FILENO标准输出(描述符1):STDOUT_FILENO标准错误(描述符2):STDERR_FILENO文件位置:从文件开头起始的字节偏移量k。应用程序能够通过执行seek操作,显式设置文件当前位置open函数参数:基本格式:o...
分类:其他好文   时间:2015-11-08 20:44:23    阅读次数:208
why hdfs's default block size is 128MB
A quick calculation shows that if the seek time is around 10 ms and the transfer rate is 100 MB/s, to make the seek time 1% of the transfer time, we n...
分类:其他好文   时间:2015-10-31 00:18:58    阅读次数:250
POJ 2752 Seek the Name, Seek the Fame
传送门Time Limit:2000MSMemory Limit:65536KTotal Submissions:14761Accepted:7407DescriptionThe little cat is so famous, that many couples tramp over hill a...
分类:其他好文   时间:2015-10-29 23:29:13    阅读次数:223
696条   上一页 1 ... 53 54 55 56 57 ... 70 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!