@Deprecated public class FileDatasetImplLegacy extends Object implements FileAccess
FileAccess
dataset interface.Dataset.DatasetType
Constructor and Description |
---|
FileDatasetImplLegacy(ds.funnel.data.format.FormatReader mFormat)
Deprecated.
|
FileDatasetImplLegacy(String datasetIdentifier,
String datasetDescription)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(String filename,
String permissions)
Deprecated.
Adds a file with the specified permission "r", "w" or "rw" to this
dataset.
|
boolean |
close()
Deprecated.
Close access to this dataset.
|
DataAvailabilityNotifier |
getDataAvailabilityNotifier()
Deprecated.
Retrieve the data availability notifier for this dataset.
|
String |
getDatasetIdentifier()
Deprecated.
Retrieve the identifier for this dataset.
|
Dataset.DatasetType |
getDatasetType()
Deprecated.
Retrieve the type of the data set
|
String |
getDescription()
Deprecated.
Retrieve a description of the dataset
|
Enumeration<Object> |
getFilenames()
Deprecated.
Retrieves the list of files in this dataset
|
Properties |
getInitializationDirectives()
Deprecated.
|
long |
getLastModificationTime()
Deprecated.
Retrieve the last update to this dataset
|
long |
getPosition(String fileName)
Deprecated.
Retrieves the position of filePointer for the given dataset
|
boolean |
initializeDataset()
Deprecated.
Invokes the initialization of the dataset.
|
boolean |
isAvailable()
Deprecated.
A check to see if the dataset is available
|
boolean |
isDataAvailable()
Deprecated.
This polls the dataset to see if data is available for consumption.
|
boolean |
isInitialized()
Deprecated.
Check to see if the dataset has been initialized
|
boolean |
isPartOfDataset(String fileName)
Deprecated.
Checks to see if the file is part of a given dataset
|
static void |
main(String[] args)
Deprecated.
|
void |
marshall(ds.funnel.data.format.FormatWriter mFormat)
Deprecated.
|
int |
read(String filename,
byte[] bytesToRead)
Deprecated.
Attempts to read a set of bytes from the underlying file.
|
int |
read(String fileName,
ByteBuffer readBuffer)
Deprecated.
Attempts to read a set of bytes from the underlying file.
|
void |
removeFile(String filename)
Deprecated.
Removes a file from this dataset.
|
void |
setPosition(String fileName,
long newPosition)
Deprecated.
Sets the position of filePointer for one of the file in the given
dataset.
|
long |
size(String fileName)
Deprecated.
Returns the current size of the file in question
|
boolean |
supportsDataAvailabilityNotifications()
Deprecated.
Indicates whether this dataset supports dynamic data availability
notifications
|
int |
write(String fileName,
byte[] bytesToWrite)
Deprecated.
Writes a byte[] to a give file.
|
int |
write(String fileName,
ByteBuffer writeBuffer)
Deprecated.
Write the specified Buffer to the file corresponding to the specified
file.
|
public static final String MODULE
public FileDatasetImplLegacy(String datasetIdentifier, String datasetDescription)
public FileDatasetImplLegacy(ds.funnel.data.format.FormatReader mFormat) throws IOException, DatasetException
IOException
DatasetException
public void marshall(ds.funnel.data.format.FormatWriter mFormat)
marshall
in interface ds.funnel.data.format.FormatMarshaller
public Dataset.DatasetType getDatasetType()
Dataset
getDatasetType
in interface Dataset
public Enumeration<Object> getFilenames()
FileAccess
getFilenames
in interface FileAccess
public boolean close() throws DatasetException
Dataset
close
in interface Dataset
true
if a graceful closure of this dataset was
performed;false
otherwise.DatasetException
public void addFile(String filename, String permissions) throws DatasetException
FileAccess
addFile
in interface FileAccess
filename
- The name of the filepermissions
- The permissions associated with this fileDatasetException
- If there are problems adding this filepublic void removeFile(String filename) throws DatasetException
FileAccess
removeFile
in interface FileAccess
filename
- The name of the fileDatasetException
- If there are problems removing this filepublic DataAvailabilityNotifier getDataAvailabilityNotifier()
Dataset
getDataAvailabilityNotifier
in interface Dataset
public String getDescription()
Dataset
getDescription
in interface Dataset
public String getDatasetIdentifier()
Dataset
getDatasetIdentifier
in interface Dataset
public long getLastModificationTime()
Dataset
getLastModificationTime
in interface Dataset
public Properties getInitializationDirectives()
public boolean initializeDataset() throws DatasetException
Dataset
initializeDataset
in interface Dataset
true
if the dataset has been initialized;
false
otherwise.DatasetException
public boolean isAvailable()
Dataset
isAvailable
in interface Dataset
true
if the dataset is available;
false
otherwise.public boolean isDataAvailable()
Dataset
isDataAvailable
in interface Dataset
true
if data is available on this dataset;
false
otherwise.public boolean isInitialized()
Dataset
isInitialized
in interface Dataset
true
if the dataset is initialized;
false
otherwise.public boolean supportsDataAvailabilityNotifications()
Dataset
supportsDataAvailabilityNotifications
in interface Dataset
true
if this dataset supports data availability
notifications;false
otherwise.public int read(String filename, byte[] bytesToRead) throws DatasetException, IOException
FileAccess
read
in interface FileAccess
filename
- The file to be readbytesToRead
- The byte[] to be read intoDatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic int read(String fileName, ByteBuffer readBuffer) throws DatasetException, IOException
FileAccess
read
in interface FileAccess
fileName
- The file to be readreadBuffer
- The buffer to be read intoDatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic int write(String fileName, byte[] bytesToWrite) throws DatasetException, IOException
FileAccess
write
in interface FileAccess
fileName
- The file to be written tobytesToWrite
- The byte[] to be written.DatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic int write(String fileName, ByteBuffer writeBuffer) throws DatasetException, IOException
FileAccess
write
in interface FileAccess
fileName
- The file to be written towriteBuffer
- The buffer holding the bytes to be writtenDatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic long getPosition(String fileName) throws DatasetException, IOException
FileAccess
getPosition
in interface FileAccess
fileName
- The name of the file.DatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic void setPosition(String fileName, long newPosition) throws DatasetException, IOException
FileAccess
setPosition
in interface FileAccess
fileName
- The filenewPosition
- The new position for the pointerDatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in performing the operationpublic long size(String fileName) throws DatasetException, IOException
FileAccess
size
in interface FileAccess
fileName
- The name of the fileDatasetException
- If there are problems retrieving the FileChannel
corresponding to the fileIOException
- If there are IO problems in completing the operation.public boolean isPartOfDataset(String fileName)
FileAccess
isPartOfDataset
in interface FileAccess
fileName
- The name of the filetrue
if the file is a part of the dataset;
false
otherwise.public static void main(String[] args)
args
- Copyright © 2015. All rights reserved.