public class RIFFPrimitivesInputStream extends FilterInputStream
in| Constructor and Description |
|---|
RIFFPrimitivesInputStream(InputStream in)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
align()
Align to an even byte position in the input stream.
|
long |
getScan()
Get the current read position within the file (as seen
by this input stream filter).
|
void |
mark(int readlimit)
Marks the input stream.
|
int |
read()
Reads one byte.
|
int |
read(byte[] b,
int offset,
int length)
Reads a sequence of bytes.
|
int |
readFourCC()
Read 4 bytes from the input stream and interpret
them as a four byte character code.
|
String |
readFourCCString()
Read 4 bytes from the input stream and interpret
them as a four byte character code.
|
int |
readFully(byte[] b,
int offset,
int length)
Reads a sequence of bytes.
|
int |
readLONG()
Read 4 bytes from the input stream and interpret
them as a 32 Bit signed LONG value.
|
int |
readUBYTE()
Read 1 byte from the input stream and interpret
them as an 8 Bit unsigned UBYTE value.
|
long |
readULONG()
Read 4 Bytes from the input Stream and interpret
them as an unsigned Integer value of type ULONG.
|
int |
readUWORD()
Read 2 bytes from the input stream and interpret
them as a 16 Bit unsigned UWORD value.
|
short |
readWORD()
Read 2 bytes from the input stream and interpret
them as a 16 Bit signed WORD value.
|
void |
reset()
Repositions the stream at the previously marked position.
|
long |
skip(long n)
Skips over and discards n bytes of data from this input stream.
|
void |
skipFully(long n)
Skips over and discards n bytes of data from this input stream.
|
available, close, markSupported, readpublic RIFFPrimitivesInputStream(InputStream in)
in - the input stream.public int readUBYTE()
throws IOException
IOExceptionpublic short readWORD()
throws IOException
IOExceptionpublic int readUWORD()
throws IOException
IOExceptionpublic int readLONG()
throws IOException
IOExceptionpublic int readFourCC()
throws IOException
IOExceptionpublic String readFourCCString() throws IOException
IOExceptionpublic long readULONG()
throws IOException
IOExceptionpublic void align()
throws IOException
IOExceptionpublic long getScan()
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int readFully(byte[] b,
int offset,
int length)
throws IOException
IOExceptionpublic int read(byte[] b,
int offset,
int length)
throws IOException
read in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreamreadlimit - The maximum limit of bytes that can be read before
the mark position becomes invalid.public void reset()
throws IOException
reset in class FilterInputStreamIOException - If the stream has not been marked or if the
mark has been invalidated.public long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void skipFully(long n)
throws IOException
n - the number of bytes to be skipped.EOFException - if this input stream reaches the end before
skipping all the bytes.IOExceptionCopyright © 2014. All Rights Reserved.