Methods Summary |
---|
protected final void | checkClosed()Check if the stream is closed and if true, throws an IOException.
if (closed) {
throw new IOException("stream is closed");
}
|
public void | close()
checkClosed();
closed = true;
|
protected void | finalize()Finalizes this object.
if (!closed) {
try {
close();
} finally {
super.finalize();
}
}
|
public void | flush()
flushBefore(getStreamPosition());
|
public void | flushBefore(long pos)
if (pos > getStreamPosition()) {
throw new IndexOutOfBoundsException("Trying to flush outside of current position");
}
if (pos < flushedPos) {
throw new IndexOutOfBoundsException("Trying to flush within already flushed portion");
}
flushedPos = pos;
// -- TODO implement
|
public int | getBitOffset()
checkClosed();
return bitOffset;
|
public java.nio.ByteOrder | getByteOrder()
return byteOrder;
|
public long | getFlushedPosition()
return flushedPos;
|
public long | getStreamPosition()
checkClosed();
return streamPos;
|
public boolean | isCached()
return false; // def
|
public boolean | isCachedFile()
return false; // def
|
public boolean | isCachedMemory()
return false; // def
|
public long | length()
return -1L;
|
public void | mark()
try {
posStack.push(getStreamPosition());
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("Stream marking error");
}
|
public abstract int | read()
|
public int | read(byte[] b)
return read(b, 0, b.length);
|
public abstract int | read(byte[] b, int off, int len)
|
public int | readBit()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public long | readBits(int numBits)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public boolean | readBoolean()
int b = read();
if (b < 0) {
throw new EOFException("EOF reached");
}
return b != 0;
|
public byte | readByte()
int b = read();
if (b < 0) {
throw new EOFException("EOF reached");
}
return (byte)b;
|
public void | readBytes(javax.imageio.stream.IIOByteBuffer buf, int len)
if (buf == null) {
throw new NullPointerException("buffer is NULL");
}
byte[] b = new byte[len];
len = read(b, 0, b.length);
buf.setData(b);
buf.setOffset(0);
buf.setLength(len);
|
public char | readChar()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public double | readDouble()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public float | readFloat()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(byte[] b, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(byte[] b)
readFully(b, 0, b.length);
|
public void | readFully(short[] s, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(char[] c, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(int[] i, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(long[] l, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(float[] f, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | readFully(double[] d, int off, int len)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public int | readInt()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public java.lang.String | readLine()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public long | readLong()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public short | readShort()
int b1 = read();
int b2 = read();
if (b1 < 0 || b2 < 0) {
throw new EOFException("EOF reached");
}
return byteOrder == ByteOrder.BIG_ENDIAN ? (short)((b1 << 8) | (b2 & 0xff))
: (short)((b2 << 8) | (b1 & 0xff));
|
public java.lang.String | readUTF()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public int | readUnsignedByte()
int b = read();
if (b < 0) {
throw new EOFException("EOF reached");
}
return b;
|
public long | readUnsignedInt()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public int | readUnsignedShort()
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public void | reset()
// -- TODO bit pos
if (!posStack.isEmpty()) {
long p = posStack.pop();
if (p < flushedPos) {
throw new IOException("marked position lies in the flushed portion of the stream");
}
seek(p);
}
|
public void | seek(long pos)
checkClosed();
if (pos < getFlushedPosition()) {
throw new IllegalArgumentException("trying to seek before flushed pos");
}
bitOffset = 0;
streamPos = pos;
|
public void | setBitOffset(int bitOffset)
checkClosed();
this.bitOffset = bitOffset;
|
public void | setByteOrder(java.nio.ByteOrder byteOrder)
this.byteOrder = byteOrder;
|
public int | skipBytes(int n)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|
public long | skipBytes(long n)
// -- TODO implement
throw new UnsupportedOperationException("Not implemented yet");
|