Package gaiasky.data.group
Class BinaryIOBase
java.lang.Object
gaiasky.data.group.BinaryIOBase
- All Implemented Interfaces:
BinaryIO
- Direct Known Subclasses:
BinaryVersion0
,BinaryVersion2
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
BinaryIOBase
(int nDoubles, int nFloats, boolean tychoIds) -
Method Summary
Modifier and TypeMethodDescriptionreadParticleRecord
(DataInputStream in, double factor) Read a star from the input stream.readParticleRecord
(MappedByteBuffer mem, double factor) Read a star from the mapped buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gaiasky.data.api.BinaryIO
writeParticleRecord
-
Field Details
-
nDoubles
protected final int nDoubles -
nFloats
protected final int nFloats -
tychoIds
protected boolean tychoIds
-
-
Constructor Details
-
BinaryIOBase
protected BinaryIOBase(int nDoubles, int nFloats, boolean tychoIds)
-
-
Method Details
-
readParticleRecord
Description copied from interface:BinaryIO
Read a star from the mapped buffer.- Specified by:
readParticleRecord
in interfaceBinaryIO
- Parameters:
mem
- Mapped memory buffer to read from.factor
- Scale factor to apply to the positions.- Returns:
- The star.
-
readParticleRecord
Description copied from interface:BinaryIO
Read a star from the input stream.- Specified by:
readParticleRecord
in interfaceBinaryIO
- Parameters:
in
- Input stream.factor
- Scale factor to apply to the positions.- Returns:
- The star.
- Throws:
IOException
- If the read fails.
-