Package org.rcsb.cif.binary.data
Class AbstractEncodedData<D>
- java.lang.Object
-
- org.rcsb.cif.binary.data.AbstractEncodedData<D>
-
- All Implemented Interfaces:
EncodedData<D>
- Direct Known Subclasses:
ByteArray,Float32Array,Float64Array,Int16Array,Int32Array,Int8Array,StringArray,Uint16Array,Uint32Array,Uint8Array
public abstract class AbstractEncodedData<D> extends Object implements EncodedData<D>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Deque<Encoding<?>>getEncoding()All encodings registered for this piece of EncodedData.booleanhasNextDecodingStep()Convenience method to state whether the List returned byEncodedData.getEncoding()is not empty.voidsetEncoding(Deque<Encoding<?>> encoding)Replace this encoding chain with a different one.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.rcsb.cif.binary.data.EncodedData
decode, getData, length
-
-
-
-
Method Detail
-
getEncoding
public Deque<Encoding<?>> getEncoding()
Description copied from interface:EncodedDataAll encodings registered for this piece of EncodedData. May be empty. May contain only partial data: e.g. adding a ByteArrayEncoding to the list will request encoding by ByteArrayCodec, this method call will subsequently fill all fields of the requested Encoding to allow for decoding.- Specified by:
getEncodingin interfaceEncodedData<D>- Returns:
- all associated Encoding instances
-
setEncoding
public void setEncoding(Deque<Encoding<?>> encoding)
Description copied from interface:EncodedDataReplace this encoding chain with a different one.- Specified by:
setEncodingin interfaceEncodedData<D>- Parameters:
encoding- the new encoding chain for this instance
-
hasNextDecodingStep
public boolean hasNextDecodingStep()
Description copied from interface:EncodedDataConvenience method to state whether the List returned byEncodedData.getEncoding()is not empty.- Specified by:
hasNextDecodingStepin interfaceEncodedData<D>- Returns:
- true if encoding steps are registered and need to be resolved to access decoded data
-
-