public abstract class TransferType
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
logger |
Constructor and Description |
---|
TransferType() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
allocate(int recordLengthBytes,
java.nio.ByteOrder byteOrder)
convenient method which gently reminds that the ByteOrder needs to be
specified with ByteBuffers.
|
static TransferType |
getForName(java.lang.String ttype,
java.util.Map<java.lang.String,java.lang.Object> properties)
returns a TranferType for the given name, or null if none is found.
|
abstract boolean |
isAscii()
return true if the transfer type uses ASCII-encodings to represent data.
|
abstract java.lang.String |
name()
return a string identifying the TransferType.
|
abstract double |
read(java.nio.ByteBuffer buffer)
read the data from the buffer.
|
abstract int |
sizeBytes()
return the number of bytes used by the transfer type.
|
java.lang.String |
toString() |
abstract void |
write(double d,
java.nio.ByteBuffer buffer)
write the data to the buffer.
|
public static TransferType getForName(java.lang.String ttype, java.util.Map<java.lang.String,java.lang.Object> properties)
ttype
- properties
- map of dataset properties. Introduced to pass in time Unit to AsciiTimeTransferType without unduly coupling codes.public abstract void write(double d, java.nio.ByteBuffer buffer)
d
- the value to write.buffer
- the byte buffer positioned to receive sizeByte bytes.public abstract double read(java.nio.ByteBuffer buffer)
buffer
- the container for the transfer type.public abstract int sizeBytes()
public abstract boolean isAscii()
public abstract java.lang.String name()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.nio.ByteBuffer allocate(int recordLengthBytes, java.nio.ByteOrder byteOrder)
recordLengthBytes
- byteOrder
-