Class BufferEncoder
java.lang.Object
nom.tam.util.OutputEncoder
nom.tam.util.FitsEncoder
nom.tam.util.BufferEncoder
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FitsEncoder
byteForBoolean, computeSize, writeArrayModifier and TypeMethodDescriptionstatic byteReturns the FITS byte value representing a logical value.static longReturns the size of this object as the number of bytes in a FITS binary representation.voidwriteArray(Object o) Writes the contents of a Java array to the output translating the data to the required binary representation.Methods inherited from class OutputEncoder
getCountModifier and TypeMethodDescriptionlonggetCount()Returns the number of encoded bytes that were written to the output.
-
Constructor Details
-
BufferEncoder
Deprecated.Instantiates a new encoder for FITS data types.- Parameters:
p- Unused, but the position and length fields are set/reset as to pretend that the buffer is perpetually half filled with data, and with position at 0. However, at no point will there be any data actually in the buffer of this object. You should by all means avoid directly writing data from this buffer to the output stream, other than the hopefully untriggered write of an existingneedBuffer(int)implementation (and it's safest if you don't override or ever callneedBuffer(int)from your code!).
-
FitsEncoderinstead which provides a similar function but in a more consistent way and with a less misleading name. This is a rusty rail implementation for of an older abandoned class only, unsafe for general use. For writing non-FITS encoding you may also useOutputEncoderas a base for implementing efficient custom encoding of binary outputs in general.