Modifier and Type | Class and Description |
---|---|
private static class |
Modifier and Type | Field and Description |
---|---|
private final int | |
private RecordingInput. | |
private static final int | |
private RandomAccessFile | |
private final FileAccess | |
private String | |
private long | |
private long | |
private RecordingInput. | |
private long |
Access | Constructor and Description |
---|---|
pack-priv | |
public |
Modifier and Type | Method and Description |
---|---|
private final long | |
public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
public String | |
public long | |
private void | |
public void | |
public final long | |
public final void | |
pack-priv void | |
public final boolean | readBoolean()
Implements java. Reads one input byte and returns
|
public final byte | |
public char | |
public double | readDouble()
Implements java. Reads eight input bytes and returns
a |
public float | readFloat()
Implements java. Reads four input bytes and returns
a |
public final void | readFully(byte[]
the buffer into which the data is read. dest, int an int specifying the offset in the data array offset, int b .an int specifying the number of bytes to read. length)Implements java. Reads |
public final void | readFully(byte[]
the buffer into which the data is read. dst)Implements java. Reads some bytes from an input
stream and stores them into the buffer
array |
public int | |
public final String | |
public long | |
private long | |
pack-priv byte | |
pack-priv long | |
pack-priv int | |
pack-priv long | |
pack-priv short | |
public short | |
public int | readUnsignedByte()
Implements java. Reads one input byte, zero-extends
it to type |
public int | readUnsignedShort()
Implements java. Reads two input bytes and returns
an |
public String | readUTF()
Implements java. Reads in a string that has been encoded using a modified UTF-8 format. |
public void | |
public void | |
public void | |
public void | |
pack-priv long | |
public final int | skipBytes(int
the number of bytes to be skipped. n)Implements java. Makes an attempt to skip over
|
private final long |
blockSize | back to summary |
---|---|
private final int blockSize |
currentBlock | back to summary |
---|---|
private RecordingInput. |
DEFAULT_BLOCK_SIZE | back to summary |
---|---|
private static final int DEFAULT_BLOCK_SIZE |
file | back to summary |
---|---|
private RandomAccessFile file |
fileAccess | back to summary |
---|---|
private final FileAccess fileAccess |
filename | back to summary |
---|---|
private String filename |
pollCount | back to summary |
---|---|
private long pollCount |
position | back to summary |
---|---|
private long position |
previousBlock | back to summary |
---|---|
private RecordingInput. |
size | back to summary |
---|---|
private long size |
RecordingInput | back to summary |
---|---|
pack-priv RecordingInput(File f, FileAccess fileAccess, int blockSize) throws IOException |
RecordingInput | back to summary |
---|---|
public RecordingInput(File f, FileAccess fileAccess) throws IOException |
calculateBlockStart | back to summary |
---|---|
private final long calculateBlockStart(long newPosition) |
close | back to summary |
---|---|
public void close() throws IOException Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
|
getFilename | back to summary |
---|---|
public String getFilename() |
getFileSize | back to summary |
---|---|
public long getFileSize() throws IOException |
initialize | back to summary |
---|---|
private void initialize(File f) throws IOException |
pollWait | back to summary |
---|---|
public void pollWait() throws IOException |
position | back to summary |
---|---|
public final long position() |
position | back to summary |
---|---|
public final void position(long newPosition) throws IOException |
positionPhysical | back to summary |
---|---|
pack-priv void positionPhysical(long position) throws IOException |
readBoolean | back to summary |
---|---|
public final boolean readBoolean() throws IOException Implements java. Doc from java. Reads one input byte and returns
|
readByte | back to summary |
---|---|
public final byte readByte() throws IOException Implements java. Doc from java. Reads and returns one input byte.
The byte is treated as a signed value in
the range
|
readChar | back to summary |
---|---|
public char readChar() throws IOException Implements java. Doc from java. Reads two input bytes and returns a
This method
is suitable for reading bytes written by
the writeChar method of interface
DataOutput .
|
readDouble | back to summary |
---|---|
public double readDouble() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
|
readFloat | back to summary |
---|---|
public float readFloat() throws IOException Implements java. Doc from java. Reads four input bytes and returns
a
|
readFully | back to summary |
---|---|
public final void readFully(byte[] dest, int offset, int length) throws IOException Implements java. Doc from java. Reads This method blocks until one of the following conditions occurs:
If
|
readFully | back to summary |
---|---|
public final void readFully(byte[] dst) throws IOException Implements java. Doc from java. Reads some bytes from an input
stream and stores them into the buffer
array This method blocks until one of the following conditions occurs:
If
|
readInt | back to summary |
---|---|
public int readInt() throws IOException Implements java. Doc from java. Reads four input bytes and returns an
This method is suitable
for reading bytes written by the writeInt
method of interface DataOutput .
|
readLine | back to summary |
---|---|
public final String readLine() throws IOException Implements java. Doc from java. Reads the next line of text from the input stream.
It reads successive bytes, converting
each byte separately into a character,
until it encounters a line terminator or
end of
file; the characters read are then
returned as a
If end of file is encountered
before even one byte can be read, then
|
readLong | back to summary |
---|---|
public long readLong() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
This method is suitable
for reading bytes written by the
|
readLongSlow | back to summary |
---|---|
private long readLongSlow() throws IOException |
readPhysicalByte | back to summary |
---|---|
pack-priv byte readPhysicalByte() throws IOException |
readPhysicalLong | back to summary |
---|---|
pack-priv long readPhysicalLong() throws IOException |
readRawInt | back to summary |
---|---|
pack-priv int readRawInt() throws IOException |
readRawLong | back to summary |
---|---|
pack-priv long readRawLong() throws IOException |
readRawShort | back to summary |
---|---|
pack-priv short readRawShort() throws IOException |
readShort | back to summary |
---|---|
public short readShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
a
This method
is suitable for reading the bytes written
by the writeShort method of
interface DataOutput .
|
readUnsignedByte | back to summary |
---|---|
public int readUnsignedByte() throws IOException Implements java. Doc from java. Reads one input byte, zero-extends
it to type
|
readUnsignedShort | back to summary |
---|---|
public int readUnsignedShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
an
This method is suitable for reading the bytes
written by the writeShort method
of interface DataOutput if
the argument to writeShort
was intended to be a value in the range
0 through 65535 .
|
readUTF | back to summary |
---|---|
public String readUTF() throws IOException Implements java. Doc from java. Reads in a string that has been encoded using a
modified UTF-8
format.
The general contract of
First, two bytes are read and used to
construct an unsigned 16-bit integer in
exactly the manner of the
If the first byte of a group
matches the bit pattern
If the first byte
of a group matches the bit pattern
If the first byte of a group
matches the bit pattern 1110xxxx ,
then the group consists of that byte a
and two more bytes b and c .
If there is no byte c (because
byte a was one of the last
two of the bytes to be read), or either
byte b or byte c
does not match the bit pattern 10xxxxxx ,
then a UTFDataFormatException
is thrown. Otherwise, the group is converted
to the character:
If the first byte of a group matches the
pattern 1111xxxx or the pattern
10xxxxxx , then a UTFDataFormatException
is thrown.
If end of file is encountered
at any time during this entire process,
then an
After every group has been converted to
a character by this process, the characters
are gathered, in the same order in which
their corresponding groups were read from
the input stream, to form a
The
|
require | back to summary |
---|---|
public void require(int minimumBytes, String errorMessage) throws IOException |
setFile | back to summary |
---|---|
public void setFile(Path path) throws IOException |
setStreamed | back to summary |
---|---|
public void setStreamed() |
setValidSize | back to summary |
---|---|
public void setValidSize(long size) |
size | back to summary |
---|---|
pack-priv long size() |
skipBytes | back to summary |
---|---|
public final int skipBytes(int n) throws IOException Implements java. Doc from java. Makes an attempt to skip over
|
trimToFileSize | back to summary |
---|---|
private final long trimToFileSize(long position) throws IOException |
Modifier and Type | Field and Description |
---|---|
private long | |
private long | |
private byte[] |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
pack-priv boolean | |
public byte | |
public void | |
public void |
blockPosition | back to summary |
---|---|
private long blockPosition |
blockPositionEnd | back to summary |
---|---|
private long blockPositionEnd |
bytes | back to summary |
---|---|
private byte[] bytes |
Block | back to summary |
---|---|
private Block() |
contains | back to summary |
---|---|
pack-priv boolean contains(long position) |
get | back to summary |
---|---|
public byte get(long position) |
read | back to summary |
---|---|
public void read(RandomAccessFile file, int amount) throws IOException |
reset | back to summary |
---|---|
public void reset() |