public class BufferedRandomAccessFile extends 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 |
protected long |
curpos |
protected long |
fileendpos |
protected String |
filename |
protected long |
initfilelen |
| 构造器和说明 |
|---|
BufferedRandomAccessFile(File file) |
BufferedRandomAccessFile(File file,
int bufbitlen) |
BufferedRandomAccessFile(File file,
String mode) |
BufferedRandomAccessFile(File file,
String mode,
int bufbitlen) |
BufferedRandomAccessFile(String name) |
BufferedRandomAccessFile(String name,
int bufbitlen) |
BufferedRandomAccessFile(String name,
String mode) |
BufferedRandomAccessFile(String name,
String mode,
int bufbitlen) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
append(byte bw) |
void |
close() |
long |
getFilePointer() |
long |
length() |
static void |
main(String[] args) |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
byte |
read(long pos) |
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, writeUTFprotected byte[] buf
protected int bufbitlen
protected int bufsize
protected long bufmask
protected boolean bufdirty
protected int bufusedsize
protected long curpos
protected long bufstartpos
protected long bufendpos
protected long fileendpos
protected boolean append
protected String filename
protected long initfilelen
public BufferedRandomAccessFile(String name) throws IOException
IOExceptionpublic BufferedRandomAccessFile(File file) throws IOException, FileNotFoundException
public BufferedRandomAccessFile(String name, int bufbitlen) throws IOException
IOExceptionpublic BufferedRandomAccessFile(File file, int bufbitlen) throws IOException, FileNotFoundException
public BufferedRandomAccessFile(String name, String mode) throws IOException
IOExceptionpublic BufferedRandomAccessFile(File file, String mode) throws IOException, FileNotFoundException
public BufferedRandomAccessFile(String name, String mode, int bufbitlen) throws IOException
IOExceptionpublic BufferedRandomAccessFile(File file, String mode, int bufbitlen) throws IOException, FileNotFoundException
public byte read(long pos)
throws IOException
IOExceptionpublic boolean write(byte bw)
throws IOException
IOExceptionpublic boolean append(byte bw)
throws IOException
IOExceptionpublic boolean write(byte bw,
long pos)
throws IOException
IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write 在接口中 DataOutputwrite 在类中 RandomAccessFileIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 RandomAccessFileIOExceptionpublic void write(byte[] b)
throws IOException
write 在接口中 DataOutputwrite 在类中 RandomAccessFileIOExceptionpublic int read(byte[] b)
throws IOException
read 在类中 RandomAccessFileIOExceptionpublic void seek(long pos)
throws IOException
seek 在类中 RandomAccessFileIOExceptionpublic long length()
throws IOException
length 在类中 RandomAccessFileIOExceptionpublic void setLength(long newLength)
throws IOException
setLength 在类中 RandomAccessFileIOExceptionpublic long getFilePointer()
throws IOException
getFilePointer 在类中 RandomAccessFileIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RandomAccessFileIOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2016. All rights reserved.