|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.DataCollection
edu.unh.sdb.datasource.DataSource
edu.unh.sdb.datasource.PhysicalDataSource
edu.unh.sdb.datasource.BinaryFileDataSource
public abstract class BinaryFileDataSource
This class will read from a file of binary data, providing an n-dimensional datasource view of that file. For the moment, we'll assume that all data is in big-endian Java Native format.
Field Summary | |
---|---|
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
|
Fields inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url |
Fields inherited from class edu.unh.sdb.datasource.DataSource |
---|
fdlDescriptor, isActivated, name, wsName |
Fields inherited from class edu.unh.sdb.datasource.DataCollection |
---|
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
void |
activate()
Open the binary data file for this datasource. |
static BinaryFileDataSource |
createBinaryFileDataSource(java.lang.String name,
RecordDescriptor recordDesc,
ISBounds theBounds,
AxisOrdering ordering,
java.lang.String URL,
java.nio.ByteOrder endian,
int dataOrder)
Deprecated. use DataSource.create() |
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 |
static void |
main(java.lang.String[] args)
|
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. |
Methods inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
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, setMaxBufferSize, setMaxGapSize, subblock, subblock, subblock, toString |
Methods inherited from class edu.unh.sdb.datasource.DataSource |
---|
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getName, getValues, isActivated |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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)
Method Detail |
---|
public void activate()
activate
in class DataSource
public void deactivate()
deactivate
in class PhysicalDataSource
public void setFileOffset(long offset)
public long getFileOffset()
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 static BinaryFileDataSource createBinaryFileDataSource(java.lang.String name, RecordDescriptor recordDesc, ISBounds theBounds, AxisOrdering ordering, java.lang.String URL, java.nio.ByteOrder endian, int dataOrder)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |