public abstract class BinaryObject extends Object
ConfigAreaFile).
Diese Klasse bietet einfache Methoden um Objekte aus DataInput-Objekten (wie DataInputStreams oder BufferedRandomAccessFiles)
einzulesen und sie wieder zu schreiben.| Modifier and Type | Field and Description |
|---|---|
static int |
CONFIG_OBJ_HEADER_SIZE
Größe des Headers fär Konfigurationsobjekte:
ID (long), PidHashCode (int), Typ-ID (long), Objekttyp (byte), Ungültig (short), Gültig (short)
|
static int |
CONFIGURATION_OBJECT_TYPE |
static int |
DYN_OBJ_HEADER_SIZE
Größe des Headers fär dynamische Objekte:
ID (long), PidHashCode (int), Typ-ID (long), Objekttyp (byte), Ungültig (long), Gültig (long), Simulationsvariante (short)
|
static int |
DYNAMIC_OBJECT_TYPE |
| Constructor and Description |
|---|
BinaryObject() |
| Modifier and Type | Method and Description |
|---|---|
static BinaryObject |
fromDataInput(DataInput input)
Liest ein Objekt ein
|
abstract long |
getObjectId()
Gibt die Objekt-ID zurück
|
abstract byte[] |
getPackedBytes()
Gibt die gepackten Bytes zurück.
|
abstract int |
getPidHashCode()
Gibt den Pid-Hashcode zurück
|
abstract long |
getTypeId()
Gibt die ID des Objekttyps zuück
|
abstract SystemObjectInformationInterface |
toSystemObjectInfo(ConfigAreaFile file,
long position) |
abstract int |
write(DataOutput output)
Schreibt das Objekt in den Ausgabe-Stream
|
public static final int CONFIG_OBJ_HEADER_SIZE
public static final int DYN_OBJ_HEADER_SIZE
public static final int CONFIGURATION_OBJECT_TYPE
public static final int DYNAMIC_OBJECT_TYPE
public static BinaryObject fromDataInput(DataInput input) throws IOException
input - Eingabe-Stream oder BufferedRandomAccessFile, das sich an der richtigen Position befindet.
Der Stream befindet sich nach dem Einlesen garantiert an der Position nach dem Objekt (oder der Lücke),
wo also ein weiteres Objekt gelesen werden kännte.IOExceptionpublic abstract int write(DataOutput output) throws IOException
output - AusgabeIOExceptionpublic abstract long getObjectId()
public abstract int getPidHashCode()
public abstract long getTypeId()
public abstract byte[] getPackedBytes()
public abstract SystemObjectInformationInterface toSystemObjectInfo(ConfigAreaFile file, long position) throws IOException, NoSuchVersionException
IOExceptionNoSuchVersionException