Class PrimitiveType<B extends Buffer>
java.lang.Object
nom.tam.util.type.ElementType<B>
nom.tam.util.type.PrimitiveType<B>
- Type Parameters:
B- the generic type of data buffer
- Direct Known Subclasses:
PrimitiveTypeBase
Deprecated.
-
Field Summary
Fields inherited from class ElementType
BOOLEAN, BYTE, CHAR, COPY_BLOCK_SIZE, DOUBLE, FLOAT, INT, LONG, SHORT, STRING, UNKNOWNModifier and TypeFieldDescriptionstatic final ElementType<Buffer> The FITS representation of a boolean value in binary tablesstatic final ElementType<ByteBuffer> The FITS representation of a single (signed) byte value in images and binary tablesstatic final ElementType<ByteBuffer> The FITS representation of a Javacharvalue in binary tablesstatic final intDeprecated.(for internal use) It's visibility may be reduced to the package level in the future.static final ElementType<DoubleBuffer> The FITS representation of a 64-bit double precison floating-point value in images and binary tablesstatic final ElementType<FloatBuffer> The FITS representation of a 32-bit single precison floating-point value in images and binary tablesstatic final ElementType<IntBuffer> The FITS representation of a 32-bit sined integer value in images and binary tablesstatic final ElementType<LongBuffer> The FITS representation of a 64-bit sined integer value in images and binary tablesstatic final ElementType<ShortBuffer> The FITS representation of a 16-bit sined integer value in images and binary tablesstatic final ElementType<Buffer> The FITS representation of an ASCII string in binary tablesstatic final ElementType<Buffer> Anything else for which we do not have a supported FITS representation -
Method Summary
Methods inherited from class ElementType
appendBuffer, appendToByteBuffer, asTypedBuffer, bitPix, bufferClass, convertToByteBuffer, forBitpix, forBuffer, forClass, forDataID, forNearestBitpix, getArray, getArray, getArray, individualSize, is, isVariableSize, newArray, newBuffer, newBuffer, primitiveClass, putArray, putArray, putArray, size, size, sliceBuffer, type, wrap, wrapperClassModifier and TypeMethodDescriptionvoidappendBuffer(B buffer, B dataToAppend) Appends data from one buffer to another.voidappendToByteBuffer(ByteBuffer byteBuffer, B dataToAppend) Appends data from one buffer to a byte buffer.asTypedBuffer(ByteBuffer buffer) Returns a typed view of a byte buffer, suitable for transacting elements of this type directly.intbitPix()Returns the integer BITPIX value to set in FITS headers for image HDUs of this element type.Returns the class of buffer that can be used to serialize or deserialize elements of this type.convertToByteBuffer(Object array) Serializes a 1D Java array containing Java native elements into a buffer using the appropriate FITS representationstatic ElementType<Buffer> forBitpix(int bitPix) Returns the FITS element type that matches the specified BITPIX value exactly.static <B extends Buffer>
ElementType<B> forBuffer(B b) Returns the FITS element type that can transact with the specified buffer type directly.static <B extends Buffer>
ElementType<B> Returns the FITS element type for a given Java typestatic ElementType<Buffer> forDataID(char type) Returns the Fits element type for a given Java array type letter.static ElementType<Buffer> forNearestBitpix(int bitPix) Returns the FITS element type that is nearest to the specified BITPIX value.final voidGets all elements of an array from a bufferfinal voidGets elements of an array from a buffer, starting at the beginning of the array.voidGets elements of an array from a buffer, starting at the specified array index.final booleanDeprecated.UseElementType.isVariableSize()instead.booleanis(ElementType<? extends Buffer> other) Checks if this element type is the same as another.booleanChecks if this type of element has a variable size, rather than a fixed sizenewArray(int length) Creates a new 1D Java array for storing elements of this type.final BnewBuffer(int length) Creates a new new buffer of the specified size for this type of elementsfinal BnewBuffer(long length) Currently the same asElementType.newBuffer(int), but in the future it may be used to implement large memory mapped buffers....Class<?> Returns the Java primitive type corresponding to this element, if anyfinal voidPuts all elements from an array into the given bufferfinal voidPuts elements from an array into the given buffer, starting at the beginning of the arrayvoidPuts elements from an array into the given buffer, starting at the specified array index.intsize()Returns the number of bytes per elementsintReturns the size of an element, provided it matches our element type.sliceBuffer(B buffer) Returns a new typed buffer that starts at the the current position of the supplied typed buffer.chartype()Returns the Java letter-code for this FITS element type.Returns a buffer for this element type by wrapping a suitable 1D array as its backing store.Class<?> Returns the boxed Java type for this type of element.
ElementTypeinstead.