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 ReadStrategyIIgetInstance()intreadInt(byte[] buf, int start_idx)intreadInt(java.io.InputStream is)longreadLong(byte[] buf, int start_idx)longreadLong(java.io.InputStream is)floatreadS15Fixed16Number(byte[] buf, int start_idx)floatreadS15Fixed16Number(java.io.InputStream is)shortreadShort(byte[] buf, int start_idx)shortreadShort(java.io.InputStream is)floatreadU16Fixed16Number(byte[] buf, int start_idx)floatreadU16Fixed16Number(java.io.InputStream is)floatreadU8Fixed8Number(byte[] buf, int start_idx)floatreadU8Fixed8Number(java.io.InputStream is)longreadUnsignedInt(byte[] buf, int start_idx)longreadUnsignedInt(java.io.InputStream is)intreadUnsignedShort(byte[] buf, int start_idx)intreadUnsignedShort(java.io.InputStream is)
-
Method Details
-
getInstance
-
readInt
public int readInt(byte[] buf, int start_idx)- Specified by:
readIntin interfaceReadStrategy
-
readInt
public int readInt(java.io.InputStream is) throws java.io.IOException- Specified by:
readIntin interfaceReadStrategy- Throws:
java.io.IOException
-
readLong
public long readLong(byte[] buf, int start_idx)- Specified by:
readLongin interfaceReadStrategy
-
readLong
public long readLong(java.io.InputStream is) throws java.io.IOException- Specified by:
readLongin interfaceReadStrategy- Throws:
java.io.IOException
-
readS15Fixed16Number
public float readS15Fixed16Number(byte[] buf, int start_idx)- Specified by:
readS15Fixed16Numberin interfaceReadStrategy
-
readS15Fixed16Number
public float readS15Fixed16Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readS15Fixed16Numberin interfaceReadStrategy- Throws:
java.io.IOException
-
readShort
public short readShort(byte[] buf, int start_idx)- Specified by:
readShortin interfaceReadStrategy
-
readShort
public short readShort(java.io.InputStream is) throws java.io.IOException- Specified by:
readShortin interfaceReadStrategy- Throws:
java.io.IOException
-
readU16Fixed16Number
public float readU16Fixed16Number(byte[] buf, int start_idx)- Specified by:
readU16Fixed16Numberin interfaceReadStrategy
-
readU16Fixed16Number
public float readU16Fixed16Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readU16Fixed16Numberin interfaceReadStrategy- Throws:
java.io.IOException
-
readU8Fixed8Number
public float readU8Fixed8Number(byte[] buf, int start_idx)- Specified by:
readU8Fixed8Numberin interfaceReadStrategy
-
readU8Fixed8Number
public float readU8Fixed8Number(java.io.InputStream is) throws java.io.IOException- Specified by:
readU8Fixed8Numberin interfaceReadStrategy- Throws:
java.io.IOException
-
readUnsignedInt
public long readUnsignedInt(byte[] buf, int start_idx)- Specified by:
readUnsignedIntin interfaceReadStrategy
-
readUnsignedInt
public long readUnsignedInt(java.io.InputStream is) throws java.io.IOException- Specified by:
readUnsignedIntin interfaceReadStrategy- Throws:
java.io.IOException
-
readUnsignedShort
public int readUnsignedShort(byte[] buf, int start_idx)- Specified by:
readUnsignedShortin interfaceReadStrategy
-
readUnsignedShort
public int readUnsignedShort(java.io.InputStream is) throws java.io.IOException- Specified by:
readUnsignedShortin interfaceReadStrategy- Throws:
java.io.IOException
-