Interface FieldDecompressor
- All Known Implementing Classes:
BinaryFieldEncoder,RangeCompressor
public interface FieldDecompressor
All classes capable of decompressing a field must implement this interface
- Version:
- $Revision: 1.4 $
- Author:
- Alan Hudson.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanSupport(int fieldType, int method) Can this fieldCompressor support this compression methodbooleandecompressBoolean(DataInputStream dis, int fieldType) Decompress this field.voiddecompressBoolean(DataInputStream dis, int fieldType, boolean[] data) Decompress this field.doubledecompressDouble(DataInputStream dis, int fieldType) Decompress this field.voiddecompressDouble(DataInputStream dis, int fieldType, double[] data) Decompress this field.voiddecompressDouble(DataInputStream dis, int fieldType, double[][] data) Decompress this field.floatdecompressFloat(DataInputStream dis, int fieldType) Decompress this field.voiddecompressFloat(DataInputStream dis, int fieldType, float[] data) Decompress this field.voiddecompressFloat(DataInputStream dis, int fieldType, float[][] data) Decompress this field.intdecompressInt(DataInputStream dis, int fieldType) Decompress this field.voiddecompressInt(DataInputStream dis, int fieldType, int[] data) Decompress this field.longdecompressLong(DataInputStream dis, int fieldType) Decompress this field.voiddecompressLong(DataInputStream dis, int fieldType, long[] data) Decompress this field.decompressString(DataInputStream dis, int fieldType) Decompress this field.voiddecompressString(DataInputStream dis, int fieldType, String[] data) Decompress this field.intGet the length of variable length field.
-
Method Details
-
canSupport
boolean canSupport(int fieldType, int method) Can this fieldCompressor support this compression method- Parameters:
fieldType- What type of field, defined in FieldConstants.method- What method of compression. 0-127 defined by Web3D Consortium.- Returns:
-
nextLength
Get the length of variable length field.- Parameters:
dis-- Returns:
- The length of the upcoming field in number of type units.
- Throws:
IOException
-
decompressInt
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressInt
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressBoolean
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressBoolean
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressFloat
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressFloat
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressFloat
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressLong
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressLong
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressDouble
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressDouble
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressDouble
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-
decompressString
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.- Returns:
- The field value
- Throws:
IOException
-
decompressString
Decompress this field.- Parameters:
dis- The stream to read fromfieldType- The type of field to compress from FieldConstants.data- The field data, must be preallocated- Throws:
IOException
-