由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 问个io的问题
相关主题
请教一个问题,thanks!如何显示load文件的正确进程
问个很简单的问题?How to write a file to the same directory of the class file?
关于char和int的问题guessContentTypeFromStream(InputStream)总是返回null怎么办?
Re: 如何从键盘输入获得一个float值?谢谢!怎样吧byte[]变成java.security.Key?
Re: How can I call another program from Java?InputStream.read() 被block的问题(陷入无限等待)
怎么从键盘输入整数或float?怎麼得到字符串中的raw bytes?
请问JSP/SERVLET和MYSQL如何实现照片上载和调用Process的问题
help about bitstream writerHow to parse the bytes[]
相关话题的讨论汇总
话题: seek话题: however
进入Java版参与讨论
1 (共1页)
c******e
发帖数: 139
1
往一个文件的指定位置写东西,比如写一个byte,该用什么method?
多谢指导!
c******e
发帖数: 139
2
怎么write?
我用DataInputStream in = new DataInputStream(new
FileInputStream("db-1x2.db"));
然后in.readByte()等读文件. 读到某一位置要写,怎么操作?
c*****t
发帖数: 1879
3
InputStream interface doesn't have the seek function. However, one
way dealing with seek is actually internally maintaining the position
counter. Then use skip() function to skip to the appropriate location.
Also, some InputStream support mark, but FileInputStream doesn't support
it.
In short, InputStream can "seek" used if your position seek is sequential.
However, if you need to seek backward, use RandomAccessFile, FileChannel,
etc.

【在 c******e 的大作中提到】
: 怎么write?
: 我用DataInputStream in = new DataInputStream(new
: FileInputStream("db-1x2.db"));
: 然后in.readByte()等读文件. 读到某一位置要写,怎么操作?

1 (共1页)
进入Java版参与讨论
相关主题
How to parse the bytes[]Re: How can I call another program from Java?
Java练习题 7怎么从键盘输入整数或float?
Java练习题 11请问JSP/SERVLET和MYSQL如何实现照片上载和调用
read from multiple inputstreams at the same time?help about bitstream writer
请教一个问题,thanks!如何显示load文件的正确进程
问个很简单的问题?How to write a file to the same directory of the class file?
关于char和int的问题guessContentTypeFromStream(InputStream)总是返回null怎么办?
Re: 如何从键盘输入获得一个float值?谢谢!怎样吧byte[]变成java.security.Key?
相关话题的讨论汇总
话题: seek话题: however