Package pixy.io
Class ReadStrategyII
java.lang.Object
pixy.io.ReadStrategyII
- All Implemented Interfaces:
ReadStrategy
public class ReadStrategyII extends java.lang.Object implements ReadStrategy
Read strategy for Intel byte order LITTLE-ENDIAN stream.
- Version:
- 1.0 12/27/2012
- Author:
- Wen Yu, yuwen_66@yahoo.com
-
Method Summary
Modifier and Type Method Description static ReadStrategyII
getInstance()
int
readInt(byte[] buf, int start_idx)
int
readInt(java.io.InputStream is)
long
readLong(byte[] buf, int start_idx)
long
readLong(java.io.InputStream is)
float
readS15Fixed16Number(byte[] buf, int start_idx)
float
readS15Fixed16Number(java.io.InputStream is)
short
readShort(byte[] buf, int start_idx)
short
readShort(java.io.InputStream is)
float
readU16Fixed16Number(byte[] buf, int start_idx)
float
readU16Fixed16Number(java.io.InputStream is)
float
readU8Fixed8Number(byte[] buf, int start_idx)
float
readU8Fixed8Number(java.io.InputStream is)
long
readUnsignedInt(byte[] buf, int start_idx)
long
readUnsignedInt(java.io.InputStream is)
int
readUnsignedShort(byte[] buf, int start_idx)
int
readUnsignedShort(java.io.InputStream is)
-
Method Details
-
getInstance
-
readInt
public int readInt(byte[] buf, int start_idx)- Specified by:
readInt
in interfaceReadStrategy
-
readInt
public int readInt(java.io.InputStream is) throws java.io.IOException- Specified by:
readInt
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readLong
public long readLong(byte[] buf, int start_idx)- Specified by:
readLong
in interfaceReadStrategy
-
readLong
public long readLong(java.io.InputStream is) throws java.io.IOException- Specified by:
readLong
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readS15Fixed16Number
public float readS15Fixed16Number(byte[] buf, int start_idx)- Specified by:
readS15Fixed16Number
in interfaceReadStrategy
-
readS15Fixed16Number
public float readS15Fixed16Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readS15Fixed16Number
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readShort
public short readShort(byte[] buf, int start_idx)- Specified by:
readShort
in interfaceReadStrategy
-
readShort
public short readShort(java.io.InputStream is) throws java.io.IOException- Specified by:
readShort
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readU16Fixed16Number
public float readU16Fixed16Number(byte[] buf, int start_idx)- Specified by:
readU16Fixed16Number
in interfaceReadStrategy
-
readU16Fixed16Number
public float readU16Fixed16Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readU16Fixed16Number
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readU8Fixed8Number
public float readU8Fixed8Number(byte[] buf, int start_idx)- Specified by:
readU8Fixed8Number
in interfaceReadStrategy
-
readU8Fixed8Number
public float readU8Fixed8Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readU8Fixed8Number
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readUnsignedInt
public long readUnsignedInt(byte[] buf, int start_idx)- Specified by:
readUnsignedInt
in interfaceReadStrategy
-
readUnsignedInt
public long readUnsignedInt(java.io.InputStream is) throws java.io.IOException- Specified by:
readUnsignedInt
in interfaceReadStrategy
- Throws:
java.io.IOException
-
readUnsignedShort
public int readUnsignedShort(byte[] buf, int start_idx)- Specified by:
readUnsignedShort
in interfaceReadStrategy
-
readUnsignedShort
public int readUnsignedShort(java.io.InputStream is) throws java.io.IOException- Specified by:
readUnsignedShort
in interfaceReadStrategy
- Throws:
java.io.IOException
-