public abstract class BinaryFileDataSource extends PhysicalDataSource
Modifier and Type | Field and Description |
---|---|
protected IntegerIndexSpaceID |
bufferIterCopy |
protected IndexSpaceID |
bufferUpper |
protected IndexSpaceID |
dimensions |
protected java.nio.channels.FileChannel |
fChannel |
protected long |
iniOffset |
protected IntegerIndexSpaceID |
iterCopy |
protected int |
leastSignificantAxis |
protected java.io.RandomAccessFile |
raFile |
protected int |
recordByteSize |
protected int |
recordNumFields |
protected int |
srcRodByteSize |
protected int |
srcRodSize |
protected int[] |
steps |
protected Datum |
tempDatum |
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url
fdlDescriptor, isActivated, name, wsName
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
Constructor and Description |
---|
BinaryFileDataSource(java.lang.String name,
FDLDescriptor fdl)
Create a BinaryFileDataSource from an fdl
|
BinaryFileDataSource(java.lang.String name,
RecordDescriptor recordDesc,
ISBounds theBounds,
AxisOrdering ordering,
java.lang.String URL,
java.nio.ByteOrder endian)
create a BinaryFileDataSource, set the initial file offset at 0
|
BinaryFileDataSource(java.lang.String name,
RecordDescriptor recordDesc,
ISBounds theBounds,
AxisOrdering ordering,
java.lang.String URL,
java.nio.ByteOrder endian,
int offset)
crate a BinaryFileDataSource, set the initial file offset at the given value
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Open the binary data file for this datasource.
|
void |
deactivate()
Close the binary data file for this datasource, and the file can not
be reopened
|
boolean |
equals(java.lang.Object o)
Returns true if this BinaryFileDataSource has the same
pointOrder as the argument BinaryFileDataSource, as
well as meeting inherited criteria for equality.
|
long |
getFileOffset()
get the file initial offset
|
int |
hashCode() |
static void |
main(java.lang.String[] args) |
void |
setAxisOrdering(AxisOrdering newOrder)
Set a new the AxisOrdering for this datasource.
|
protected void |
setDatum(int i,
int storageType,
Datum datum,
java.nio.ByteBuffer buffer)
this method is used by both AttributeOrderBFDS and PointOrderBFDS in Datum methods
This method will replace setDatum(int i, int storageType, Datum datum ), and used
java.14 byteBuffer
|
void |
setFileOffset(long offset)
set the file initial offset
|
java.lang.String |
toString()
Print the data members of the DataSource in an easy to read fashion.
|
allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, deleteBuffer, deleteBuffer, deleteBuffers, getBuffer, getBuffer, getBufferSize, getBufferSize, getByteOrder, getDataFileString, getMaxBufferSize, getReadCounter, getReadLength, getURL, initializeBuffers, isBigEndian, makeBestBuffer, resetReadCounter, setBufferByteOrder, setByteOrder, setMaxBufferSize, setMaxGapSize, subblock, subblock, subblock, toString
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getFDLDescriptor, getMetadataCollection, getName, getStatistics, getValues, isActivated, setMetadataCollection
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, datum, datum, datum, datum, datum, datum, dim, getAttributeNames, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDouble, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloat, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInt, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShort, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getUpperBoundsArray, getValues, getValuesByAttribute, getValuesByPoint, longVolume, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
protected java.io.RandomAccessFile raFile
protected java.nio.channels.FileChannel fChannel
protected int[] steps
protected int leastSignificantAxis
protected int recordByteSize
protected int recordNumFields
protected Datum tempDatum
protected IntegerIndexSpaceID iterCopy
protected IntegerIndexSpaceID bufferIterCopy
protected IndexSpaceID dimensions
protected IndexSpaceID bufferUpper
protected long iniOffset
protected int srcRodSize
protected int srcRodByteSize
public BinaryFileDataSource(java.lang.String name, FDLDescriptor fdl)
name
- fdl
- public BinaryFileDataSource(java.lang.String name, RecordDescriptor recordDesc, ISBounds theBounds, AxisOrdering ordering, java.lang.String URL, java.nio.ByteOrder endian)
public BinaryFileDataSource(java.lang.String name, RecordDescriptor recordDesc, ISBounds theBounds, AxisOrdering ordering, java.lang.String URL, java.nio.ByteOrder endian, int offset)
public void activate()
activate
in class DataSource
public void deactivate()
deactivate
in class PhysicalDataSource
public void setFileOffset(long offset)
public long getFileOffset()
public void setAxisOrdering(AxisOrdering newOrder)
setAxisOrdering
in class DataCollection
protected void setDatum(int i, int storageType, Datum datum, java.nio.ByteBuffer buffer)
public java.lang.String toString()
toString
in class PhysicalDataSource
public boolean equals(java.lang.Object o)
equals
in class PhysicalDataSource
public int hashCode()
hashCode
in class java.lang.Object
public static void main(java.lang.String[] args)