|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.common.util.Bitstream.ByteOutputStream
public static class Bitstream.ByteOutputStream
Specific byte stream.
Can handle output operations only.
| Constructor Summary | |
|---|---|
Bitstream.ByteOutputStream(OutputStream stream)
|
|
| Method Summary | |
|---|---|
boolean |
canInput()
Return true if stream can handle input, i.e. |
boolean |
canOutput()
Return true if stream can handle output, i.e. |
void |
close()
Closing the underlying stream, implies Bitstream.ByteStream.flush(). |
void |
flush()
Synchronizes all underlying output stream operations, or do nothing. |
OutputStream |
getStream()
Returns the underlying stream |
void |
mark(int readLimit)
Set markpos to current position, allowing the stream to be Bitstream.ByteStream.reset(). |
long |
position()
Returns the byte position in the stream. |
int |
read()
Reads one byte from the stream. |
void |
reset()
Reset stream position to markpos as set via Bitstream.ByteStream.mark(int). |
void |
setStream(OutputStream stream)
Sets the underlying stream, without Bitstream.ByteStream.close()ing the previous one. |
long |
skip(long n)
It is implementation dependent, whether backward skip giving a negative number is supported or not. |
int |
write(byte val)
Writes one byte, to the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Bitstream.ByteOutputStream(OutputStream stream)
| Method Detail |
|---|
public void setStream(OutputStream stream)
Bitstream.ByteStreamBitstream.ByteStream.close()ing the previous one.
setStream in interface Bitstream.ByteStream<OutputStream>
public void close()
throws IOException
Bitstream.ByteStreamBitstream.ByteStream.flush().
Implementation will null the stream references,
hence Bitstream.ByteStream.setStream(Object) must be called before re-using instance.
close in interface Bitstream.ByteStream<OutputStream>IOException
public void flush()
throws IOException
Bitstream.ByteStreamoutput stream operations, or do nothing.
flush in interface Bitstream.ByteStream<OutputStream>IOExceptionpublic boolean canInput()
Bitstream.ByteStreamBitstream.ByteStream.read().
canInput in interface Bitstream.ByteStream<OutputStream>public boolean canOutput()
Bitstream.ByteStreamBitstream.ByteStream.write(byte)
canOutput in interface Bitstream.ByteStream<OutputStream>public long position()
Bitstream.ByteStream
position in interface Bitstream.ByteStream<OutputStream>
public long skip(long n)
throws IOException
Bitstream.ByteStream
skip in interface Bitstream.ByteStream<OutputStream>n - number of bytes to skip
IOExceptionpublic OutputStream getStream()
Bitstream.ByteStream
getStream in interface Bitstream.ByteStream<OutputStream>
public void mark(int readLimit)
throws UnsupportedOperationException
Bitstream.ByteStreamBitstream.ByteStream.reset().
mark in interface Bitstream.ByteStream<OutputStream>UnsupportedOperationException - is not supported, i.e. if stream is not an input stream.
public void reset()
throws UnsupportedOperationException
Bitstream.ByteStreamBitstream.ByteStream.mark(int).
markpos is kept, hence Bitstream.ByteStream.reset() can be called multiple times.
reset in interface Bitstream.ByteStream<OutputStream>UnsupportedOperationException - is not supported, i.e. if stream is not an input stream.
public int read()
throws UnsupportedOperationException
Bitstream.ByteStream
Returns Bitstream.EOS is end-of-stream is reached,
otherwise the resulting value.
read in interface Bitstream.ByteStream<OutputStream>UnsupportedOperationException - is not supported, i.e. if stream is not an input stream.
public int write(byte val)
throws IOException
Bitstream.ByteStream
Returns Bitstream.EOS is end-of-stream is reached,
otherwise the written value.
write in interface Bitstream.ByteStream<OutputStream>IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||