public class TypeBuilder extends Object
import static binio.util.TypeBuilder.*; ... CompoundType scanlineType = COMPOUND("Scanline", MEMBER("flags", USHORT), MEMBER("samples", SEQUENCE(DOUBLE, 512)) ); }; CompoundType datasetType = COMPOUND("Dataset", MEMBER("lineCount", UINT), MEMBER("scanlines", VAR_SEQUENCE(scanlineType, "lineCount")) ); }; ...
Modifier and Type | Field and Description |
---|---|
static SimpleType |
BYTE
The 8-bit signed integer type.
|
static SimpleType |
DOUBLE
The 64-bit IEEE floating point type.
|
static SimpleType |
FLOAT
The 32-bit IEEE floating point type.
|
static SimpleType |
INT
The 32-bit unsigned integer type.
|
static SimpleType |
LONG
The 64-bit signed integer type.
|
static SimpleType |
SHORT
The 16-bit signed integer type.
|
static SimpleType |
UBYTE
The 8-bit unsigned integer type.
|
static SimpleType |
UINT
The 32-bit unsigned integer type.
|
static SimpleType |
ULONG
The 64-bit unsigned integer type.
|
static SimpleType |
USHORT
The 16-bit unsigned integer type.
|
Modifier and Type | Method and Description |
---|---|
static CompoundType |
COMPOUND(String name,
CompoundMember... members)
Creates a compound type.
|
static CompoundMember |
MEMBER(String name,
Type type)
Creates a compound member.
|
static SequenceType |
SEQUENCE(Type elementType,
int elementCount)
Creates a sequence type for the given element type and count.
|
static VarSequenceType |
VAR_SEQUENCE(Type elementType,
int memberIndex)
Creates a dynamic sequence type whose element count is resolved
by a compound member determined by the given member index.
|
static VarSequenceType |
VAR_SEQUENCE(Type elementType,
String memberName)
Creates a dynamic sequence type whose element count is resolved
by a compound member determined by the given member name.
|
public static final SimpleType BYTE
public static final SimpleType UBYTE
public static final SimpleType SHORT
public static final SimpleType USHORT
public static final SimpleType INT
public static final SimpleType UINT
public static final SimpleType LONG
public static final SimpleType ULONG
public static final SimpleType FLOAT
public static final SimpleType DOUBLE
public static SequenceType SEQUENCE(Type elementType, int elementCount)
elementType
- The sequence's element type.elementCount
- The sequence's element count.public static VarSequenceType VAR_SEQUENCE(Type elementType, String memberName)
elementType
- The sequence's element type.memberName
- The parent compount's member name.public static VarSequenceType VAR_SEQUENCE(Type elementType, int memberIndex)
elementType
- The sequence's element type.memberIndex
- The parent compount's member index.public static CompoundMember MEMBER(String name, Type type)
name
- The member's name.type
- The member's type.COMPOUND(String, CompoundMember[])
public static CompoundType COMPOUND(String name, CompoundMember... members)
name
- The compound's name.members
- The compound's members.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.