类 BufferedRandomAccessFile
java.lang.Object
java.io.RandomAccessFile
cn.nukkit.nbt.stream.BufferedRandomAccessFile
- 所有已实现的接口:
Closeable
,DataInput
,DataOutput
,AutoCloseable
A
BufferedRandomAccessFile
is like a
RandomAccessFile
, but it uses a private buffer so that most
operations do not require a disk access.
Note: The operations on this class are unmonitored. Also, the correct
functioning of the RandomAccessFile
methods that are not
overridden here relies on the implementation of those methods in the
superclass.
- 作者:
- Avinash Lakshman ( [email protected]) & Prashant Malik ( [email protected] )
-
字段概要
-
构造器概要
构造器说明BufferedRandomAccessFile
(File file, String mode) Open a newBufferedRandomAccessFile
onfile
in modemode
, which should be "r" for reading only, or "rw" for reading and writing.BufferedRandomAccessFile
(File file, String mode, int size) BufferedRandomAccessFile
(String name, String mode) Open a newBufferedRandomAccessFile
on the file namedname
in modemode
, which should be "r" for reading only, or "rw" for reading and writing.BufferedRandomAccessFile
(String name, String mode, int size) -
方法概要
修饰符和类型方法说明void
close()
void
flush()
Flush any bytes in the file's buffer that have not yet been written to disk.long
long
length()
int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) byte
read1()
byte
void
seek
(long pos) void
seekUnsafe
(long pos) void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) void
writeCurrent
(byte b) 从类继承的方法 java.io.RandomAccessFile
getChannel, getFD, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
字段详细资料
-
BuffSz_
public static final int BuffSz_- 另请参阅:
-
-
构造器详细资料
-
BufferedRandomAccessFile
Open a newBufferedRandomAccessFile
onfile
in modemode
, which should be "r" for reading only, or "rw" for reading and writing.- 抛出:
IOException
-
BufferedRandomAccessFile
- 抛出:
IOException
-
BufferedRandomAccessFile
Open a newBufferedRandomAccessFile
on the file namedname
in modemode
, which should be "r" for reading only, or "rw" for reading and writing.- 抛出:
IOException
-
BufferedRandomAccessFile
-
-
方法详细资料
-
close
- 指定者:
close
在接口中AutoCloseable
- 指定者:
close
在接口中Closeable
- 覆盖:
close
在类中RandomAccessFile
- 抛出:
IOException
-
flush
Flush any bytes in the file's buffer that have not yet been written to disk. If the file was created read-only, this method is a no-op.- 抛出:
IOException
-
seek
- 覆盖:
seek
在类中RandomAccessFile
- 抛出:
IOException
-
seekUnsafe
- 抛出:
IOException
-
getFilePointer
public long getFilePointer()- 覆盖:
getFilePointer
在类中RandomAccessFile
-
length
- 覆盖:
length
在类中RandomAccessFile
- 抛出:
IOException
-
read
- 覆盖:
read
在类中RandomAccessFile
- 抛出:
IOException
-
read1
- 抛出:
IOException
-
read
- 覆盖:
read
在类中RandomAccessFile
- 抛出:
IOException
-
read
- 覆盖:
read
在类中RandomAccessFile
- 抛出:
IOException
-
readCurrent
- 抛出:
IOException
-
writeCurrent
- 抛出:
IOException
-
write
- 指定者:
write
在接口中DataOutput
- 覆盖:
write
在类中RandomAccessFile
- 抛出:
IOException
-
write
- 指定者:
write
在接口中DataOutput
- 覆盖:
write
在类中RandomAccessFile
- 抛出:
IOException
-
write
- 指定者:
write
在接口中DataOutput
- 覆盖:
write
在类中RandomAccessFile
- 抛出:
IOException
-