|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpt.tumba.parser.swf.InStream
public class InStream
Input Stream Wrapper
| Field Summary | |
|---|---|
protected int |
bitBuf
Description of the Field |
protected int |
bitPos
Description of the Field |
protected long |
bytesRead
Description of the Field |
protected java.io.InputStream |
in
Description of the Field |
| Constructor Summary | |
|---|---|
InStream(byte[] bytes)
Constructor for the InStream object |
|
InStream(java.io.InputStream in)
Constructor for the InStream object |
|
| Method Summary | |
|---|---|
static int |
bytesToSigned(byte lo,
byte hi)
Util to convert 2 bytes to a signed value |
long |
getBytesRead()
Gets the bytesRead attribute of the InStream object |
byte[] |
read()
Read all remaining bytes from the stream |
byte[] |
read(int length)
Read bytes from the input stream |
double |
readDouble()
Read a 64 bit floating point number |
float |
readFloat()
Read a 32 bit floating point number |
int |
readSBits(int numBits)
Read a signed value from the given number of bits |
short |
readSI16()
Read a signed 16 bit value |
int |
readSI32()
Read a 32 bit signed number |
java.lang.String |
readString()
Read a null terminated string using the default character encoding |
byte[] |
readStringBytes()
Read a string from the input stream |
long |
readUBits(int numBits)
Read an unsigned value from the given number of bits |
int |
readUI16()
Read an unsigned 16 bit value |
long |
readUI32()
Read an unsigned 32 bit value |
int |
readUI8()
Read an unsigned 8 bit value |
void |
setBytesRead(long read)
Sets the bytesRead attribute of the InStream object |
void |
skipBytes(long length)
Skip a number of bytes from the input stream |
void |
synchBits()
Reset the bit buffer |
static int |
ubyteToInt(byte b2)
Util to convert an unsigned byte to an unsigned int |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.InputStream in
protected long bytesRead
protected int bitBuf
protected int bitPos
| Constructor Detail |
|---|
public InStream(java.io.InputStream in)
in - Description of the Parameterpublic InStream(byte[] bytes)
bytes - Description of the Parameter| Method Detail |
|---|
public byte[] readStringBytes()
throws java.io.IOException
java.io.IOException - Description of the Exception
public java.lang.String readString()
throws java.io.IOException
java.io.IOException - Description of the Exception
public byte[] read()
throws java.io.IOException
java.io.IOException - Description of the Exception
public byte[] read(int length)
throws java.io.IOException
length - Description of the Parameter
java.io.IOException - Description of the Exceptionpublic void synchBits()
public long getBytesRead()
public void setBytesRead(long read)
read - The new bytesRead value
public void skipBytes(long length)
throws java.io.IOException
length - Description of the Parameter
java.io.IOException - Description of the Exception
public long readUBits(int numBits)
throws java.io.IOException
numBits - Description of the Parameter
java.io.IOException - Description of the Exception
public int readUI8()
throws java.io.IOException
java.io.IOException - Description of the Exception
public int readUI16()
throws java.io.IOException
java.io.IOException - Description of the Exception
public short readSI16()
throws java.io.IOException
java.io.IOException - Description of the Exception
public long readUI32()
throws java.io.IOException
java.io.IOException - Description of the Exception
public int readSBits(int numBits)
throws java.io.IOException
numBits - Description of the Parameter
java.io.IOException - Description of the Exception
public int readSI32()
throws java.io.IOException
java.io.IOException - Description of the Exception
public float readFloat()
throws java.io.IOException
java.io.IOException - Description of the Exception
public double readDouble()
throws java.io.IOException
java.io.IOException - Description of the Exceptionpublic static int ubyteToInt(byte b2)
b - Description of the Parameter
public static int bytesToSigned(byte lo,
byte hi)
lo - Description of the Parameterhi - Description of the Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||