public abstract class AbstractRandomAccessStreamContent extends AbstractRandomAccessContent
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRandomAccessStreamContent(RandomAccessMode mode) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.io.DataInputStream |
getDataInputStream() |
java.io.InputStream |
getInputStream()
Get the input stream.
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
void |
setLength(long newLength)
Sets the length of this content.
|
int |
skipBytes(int n) |
readLine, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getFilePointer, length, seekprotected AbstractRandomAccessStreamContent(RandomAccessMode mode)
protected abstract java.io.DataInputStream getDataInputStream()
throws java.io.IOException
java.io.IOExceptionpublic byte readByte()
throws java.io.IOException
java.io.IOExceptionpublic char readChar()
throws java.io.IOException
java.io.IOExceptionpublic double readDouble()
throws java.io.IOException
java.io.IOExceptionpublic float readFloat()
throws java.io.IOException
java.io.IOExceptionpublic int readInt()
throws java.io.IOException
java.io.IOExceptionpublic int readUnsignedByte()
throws java.io.IOException
java.io.IOExceptionpublic int readUnsignedShort()
throws java.io.IOException
java.io.IOExceptionpublic long readLong()
throws java.io.IOException
java.io.IOExceptionpublic short readShort()
throws java.io.IOException
java.io.IOExceptionpublic boolean readBoolean()
throws java.io.IOException
java.io.IOExceptionpublic int skipBytes(int n)
throws java.io.IOException
java.io.IOExceptionpublic void readFully(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String readUTF()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
RandomAccessContent
Notice: If you use RandomAccessContent.seek(long) you have to re-get the InputStream
java.io.IOException - if an I/O error occurs.public void setLength(long newLength)
throws java.io.IOException
RandomAccessContent
If the the newLength argument is smaller than RandomAccessContent.length(), the content is truncated.
If the the newLength argument is greater than RandomAccessContent.length(), the content grows with undefined data.
newLength - The desired content lengthjava.io.IOException - If an I/O error occurs