public class BufferedRandomAccessFile
extends java.io.RandomAccessFile
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
append |
protected byte[] |
buf |
protected int |
bufbitlen |
protected boolean |
bufdirty |
protected long |
bufendpos |
protected long |
bufmask |
protected int |
bufsize |
protected long |
bufstartpos |
protected int |
bufusedsize |
static int |
DEFAULT_BUFFER_SIZE
默认的缓存大小。
|
protected long |
fileendpos |
protected java.lang.String |
filename |
protected long |
initfilelen |
protected long |
m_lcurpos |
| 构造器和说明 |
|---|
BufferedRandomAccessFile(java.io.File file) |
BufferedRandomAccessFile(java.io.File file,
int bufbitlen) |
BufferedRandomAccessFile(java.io.File file,
java.lang.String mode) |
BufferedRandomAccessFile(java.io.File file,
java.lang.String mode,
int bufbitlen) |
BufferedRandomAccessFile(java.lang.String name) |
BufferedRandomAccessFile(java.lang.String name,
int bufbitlen) |
BufferedRandomAccessFile(java.lang.String name,
java.lang.String mode) |
BufferedRandomAccessFile(java.lang.String name,
java.lang.String mode,
int bufbitlen) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
append(byte bw) |
void |
close() |
long |
getFilePointer() |
long |
length() |
static void |
main(java.lang.String[] args) |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
byte |
read(long pos) |
byte |
readByteData() |
int |
readLine(byte[] arrayByte) |
void |
seek(long pos) |
void |
setLength(long newLength) |
boolean |
write(byte bw) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
boolean |
write(byte bw,
long pos) |
getChannel, getFD, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFpublic static final int DEFAULT_BUFFER_SIZE
protected byte[] buf
protected int bufbitlen
protected int bufsize
protected long bufmask
protected boolean bufdirty
protected int bufusedsize
protected long m_lcurpos
protected long bufstartpos
protected long bufendpos
protected long fileendpos
protected boolean append
protected java.lang.String filename
protected long initfilelen
public BufferedRandomAccessFile(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessFile(java.io.File file)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionpublic BufferedRandomAccessFile(java.lang.String name,
int bufbitlen)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessFile(java.io.File file,
int bufbitlen)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionpublic BufferedRandomAccessFile(java.lang.String name,
java.lang.String mode)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessFile(java.io.File file,
java.lang.String mode)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionpublic BufferedRandomAccessFile(java.lang.String name,
java.lang.String mode,
int bufbitlen)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessFile(java.io.File file,
java.lang.String mode,
int bufbitlen)
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionpublic byte read(long pos)
throws java.io.IOException
java.io.IOExceptionpublic byte readByteData()
throws java.io.IOException,
java.io.EOFException
java.io.IOExceptionjava.io.EOFExceptionpublic int readLine(byte[] arrayByte)
throws java.io.IOException
java.io.IOExceptionpublic boolean write(byte bw)
throws java.io.IOException
java.io.IOExceptionpublic boolean append(byte bw)
throws java.io.IOException
java.io.IOExceptionpublic boolean write(byte bw,
long pos)
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write 在接口中 java.io.DataOutputwrite 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write 在接口中 java.io.DataOutputwrite 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic void seek(long pos)
throws java.io.IOException
seek 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic long length()
throws java.io.IOException
length 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic void setLength(long newLength)
throws java.io.IOException
setLength 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic long getFilePointer()
throws java.io.IOException
getFilePointer 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableclose 在类中 java.io.RandomAccessFilejava.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionCopyright © 2001-2014 hynnet.com