public abstract class RandomAccessStream extends Object implements Seekable, DataInput, DataOutput
RandomAccessFile
, except it may be backed by something other than a file.
RandomAccessFile
Constructor and Description |
---|
RandomAccessStream() |
Modifier and Type | Method and Description |
---|---|
SeekableInputStream |
asInputStream()
Returns an input view of this
RandomAccessStream . |
SeekableOutputStream |
asOutputStream()
Returns an output view of this
RandomAccessStream . |
int |
read() |
int |
read(byte[] pBytes) |
int |
read(byte[] pBytes,
int pOffset,
int pLength) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, flush, flushBefore, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, reset, seek
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
public int read() throws IOException
IOException
public int read(byte[] pBytes, int pOffset, int pLength) throws IOException
IOException
public final int read(byte[] pBytes) throws IOException
IOException
public final SeekableInputStream asInputStream()
RandomAccessStream
.
Invoking this method several times, will return the same object.
Note that read access is NOT synchronized.SeekableInputStream
reading from this streampublic final SeekableOutputStream asOutputStream()
RandomAccessStream
.
Invoking this method several times, will return the same object.
Note that write access is NOT synchronized.SeekableOutputStream
writing to this streamCopyright © 2017. All rights reserved.