Class PrimitiveTypeBase<B extends Buffer>
java.lang.Object
nom.tam.util.type.PrimitiveTypeBase<B>
- All Implemented Interfaces:
PrimitiveType<B>
- Direct Known Subclasses:
BooleanType, ByteType, CharType, DoubleType, FloatType, IntType, LongType, ShortType, StringType, UnknownType
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrimitiveTypeBase(int size, boolean individualSize, Class<?> primitiveClass, Class<?> wrapperClass, Class<B> bufferClass, char type, int bitPix) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendBuffer(B buffer, B dataToAppend) voidappendToByteBuffer(ByteBuffer byteBuffer, B dataToAppend) asTypedBuffer(ByteBuffer buffer) intbitPix()convertToByteBuffer(Object array) final voidfinal voidvoidbooleanbooleanis(PrimitiveType<? extends Buffer> other) newArray(int length) final BnewBuffer(int length) final BnewBuffer(long length) Class<?> final voidvoidintsize()intcurrently the only individual size primitive so, keep it simplesliceBuffer(B buffer) chartype()Class<?>
-
Field Details
-
COPY_BLOCK_SIZE
public static final int COPY_BLOCK_SIZE- See Also:
-
bitPix
private final int bitPix -
bufferClass
-
individualSize
private final boolean individualSize -
primitiveClass
-
size
private final int size -
type
private final char type -
wrapperClass
-
-
Constructor Details
-
PrimitiveTypeBase
-
-
Method Details
-
appendBuffer
- Specified by:
appendBufferin interfacePrimitiveType<B extends Buffer>
-
appendToByteBuffer
- Specified by:
appendToByteBufferin interfacePrimitiveType<B extends Buffer>
-
asTypedBuffer
- Specified by:
asTypedBufferin interfacePrimitiveType<B extends Buffer>
-
bitPix
public int bitPix()- Specified by:
bitPixin interfacePrimitiveType<B extends Buffer>
-
bufferClass
- Specified by:
bufferClassin interfacePrimitiveType<B extends Buffer>
-
convertToByteBuffer
- Specified by:
convertToByteBufferin interfacePrimitiveType<B extends Buffer>
-
getArray
-
getArray
-
getArray
-
individualSize
public boolean individualSize()- Specified by:
individualSizein interfacePrimitiveType<B extends Buffer>
-
is
- Specified by:
isin interfacePrimitiveType<B extends Buffer>
-
newArray
- Specified by:
newArrayin interfacePrimitiveType<B extends Buffer>
-
newBuffer
- Specified by:
newBufferin interfacePrimitiveType<B extends Buffer>
-
newBuffer
- Specified by:
newBufferin interfacePrimitiveType<B extends Buffer>
-
primitiveClass
- Specified by:
primitiveClassin interfacePrimitiveType<B extends Buffer>
-
putArray
-
putArray
-
size
public int size()- Specified by:
sizein interfacePrimitiveType<B extends Buffer>
-
size
currently the only individual size primitive so, keep it simple- Specified by:
sizein interfacePrimitiveType<B extends Buffer>- Parameters:
instance- the object to calculate the size- Returns:
- the size in bytes of the object instance
-
sliceBuffer
- Specified by:
sliceBufferin interfacePrimitiveType<B extends Buffer>
-
type
public char type()- Specified by:
typein interfacePrimitiveType<B extends Buffer>
-
wrap
-
wrapperClass
- Specified by:
wrapperClassin interfacePrimitiveType<B extends Buffer>
-