Package gaiasky.data.group
Class BinaryIOBase
java.lang.Object
gaiasky.data.group.BinaryIOBase
- All Implemented Interfaces:
BinaryIO
- Direct Known Subclasses:
BinaryVersion0,BinaryVersion2
public abstract class BinaryIOBase extends java.lang.Object implements BinaryIO
Base implementation of binary version, which accommodates most versions.
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedBinaryIOBase(int nDoubles, int nFloats, boolean tychoIds) -
Method Summary
Modifier and Type Method Description ParticleRecordreadParticleRecord(java.io.DataInputStream in, double factor)Read a star from the input streamParticleRecordreadParticleRecord(java.nio.MappedByteBuffer mem, double factor)Read a star from the mapped bufferMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gaiasky.data.group.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:BinaryIORead a star from the mapped buffer- Specified by:
readParticleRecordin interfaceBinaryIO- Parameters:
mem- Mapped memory buffer to read fromfactor- Scale factor to apply to positions- Returns:
- The star
-
readParticleRecord
public ParticleRecord readParticleRecord(java.io.DataInputStream in, double factor) throws java.io.IOExceptionDescription copied from interface:BinaryIORead a star from the input stream- Specified by:
readParticleRecordin interfaceBinaryIO- Parameters:
in- Input streamfactor- Scale factor to apply to positions- Returns:
- The star
- Throws:
java.io.IOException
-