Метод | Описание | |
---|---|---|
ISRandomAccessIO ( System is_Renamed ) : System |
Creates a new RandomAccessIO wrapper for the given InputStream 'is'. The internal cache buffer size and increment is to to 256 kB. The maximum buffer size is set to Integer.MAX_VALUE (2 GB).
|
|
ISRandomAccessIO ( System is_Renamed, int size, int inc, int maxsize ) : System |
Creates a new RandomAccessIO wrapper for the given InputStream 'is'. The internal cache buffer will have size 'size' and will increment by 'inc' each time it is needed. The maximum buffer size is limited to 'maxsize'.
|
|
close ( ) : void |
Closes this object for reading as well as the wrapped InputStream, if not already closed. The memory used by the cache is released.
|
|
flush ( ) : void |
Does nothing since this class does not implement data output.
|
|
length ( ) : int |
Returns the length of the stream. This will cause all the data to be read. This method will block until all the data is read, which can be lengthy across the network.
|
|
read ( ) : byte | ||
readByte ( ) : byte |
Reads a byte of data from the stream.
|
|
readDouble ( ) : double |
Reads an IEEE double precision (i.e., 64 bit) floating-point number from the input.
|
|
readFloat ( ) : float |
Reads an IEEE single precision (i.e., 32 bit) floating-point number from the input.
|
|
readFully ( byte b, int off, int n ) : void |
Reads 'len' bytes of data from this file into an array of bytes. This method reads repeatedly from the stream until all the bytes are read. This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.
|
|
readInt ( ) : int |
Reads a signed int (32 bit) from the input.
|
|
readLong ( ) : long |
Reads a signed long (64 bit) from the input.
|
|
readShort ( ) : short |
Reads a signed short (16 bit) from the input.
|
|
readUnsignedByte ( ) : byte |
Reads an unsigned byte (8 bit) from the input.
|
|
readUnsignedInt ( ) : long |
Reads a unsigned int (32 bit) from the input.
|
|
readUnsignedShort ( ) : int |
Reads an unsigned short (16 bit) from the input.
|
|
seek ( int off ) : void |
Moves the current position for the next read operation to offset. The offset is measured from the beginning of the stream. If the offset is set beyond the currently cached data, the missing data will be read only when a read operation is performed. Setting the offset beyond the end of the data will cause an EOFException only if the data length is currently known, otherwise an IOException will occur when a read operation is attempted at that position.
|
|
skipBytes ( int n ) : int |
Skips 'n' bytes from the input.
|
|
write ( byte b ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeByte ( int v ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeDouble ( double v ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeFloat ( float v ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeInt ( int v ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeLong ( long v ) : void |
Throws an IOException since this class does not implement data output.
|
|
writeShort ( int v ) : void |
Throws an IOException since this class does not implement data output.
|
Метод | Описание | |
---|---|---|
growBuffer ( ) : void |
Grows the cache buffer by 'inc', upto a maximum of 'maxsize'. The buffer size will be increased by at least one byte, if no exception is thrown.
|
|
readInput ( ) : void |
Reads data from the wrapped InputStream and places it in the cache buffer. Reads all input data that will not cause it to block, but at least on byte is read (even if it blocks), unless EOF is reached. This method can not be called if EOF has been already reached (i.e. 'complete' is true). The wrapped InputStream is closed if the EOF is reached.
|
public ISRandomAccessIO ( System is_Renamed ) : System | ||
is_Renamed | System | |
Результат | System |
public ISRandomAccessIO ( System is_Renamed, int size, int inc, int maxsize ) : System | ||
is_Renamed | System | |
size | int | The initial size for the cache buffer, in bytes. /// /// |
inc | int | The size increment for the cache buffer, in bytes. /// /// |
maxsize | int | The maximum size for the cache buffer, in bytes. /// /// |
Результат | System |
public readFully ( byte b, int off, int n ) : void | ||
b | byte | The buffer into which the data is to be read. It must be long /// enough. /// /// |
off | int | The index in 'b' where to place the first byte read. /// /// |
n | int | |
Результат | void |
public seek ( int off ) : void | ||
off | int | The offset where to move to. /// /// |
Результат | void |
public skipBytes ( int n ) : int | ||
n | int | The number of bytes to skip /// /// |
Результат | int |