@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
IOExceptionDatasetExceptionpublic void marshall(ds.funnel.data.format.FormatWriter mFormat)
marshall in interface ds.funnel.data.format.FormatMarshallerpublic Dataset.DatasetType getDatasetType()
DatasetgetDatasetType in interface Datasetpublic Enumeration<Object> getFilenames()
FileAccessgetFilenames in interface FileAccesspublic boolean close()
throws DatasetException
Datasetclose in interface Datasettrue if a graceful closure of this dataset was
performed;false otherwise.DatasetExceptionpublic void addFile(String filename, String permissions) throws DatasetException
FileAccessaddFile in interface FileAccessfilename - The name of the filepermissions - The permissions associated with this fileDatasetException - If there are problems adding this filepublic void removeFile(String filename) throws DatasetException
FileAccessremoveFile in interface FileAccessfilename - The name of the fileDatasetException - If there are problems removing this filepublic DataAvailabilityNotifier getDataAvailabilityNotifier()
DatasetgetDataAvailabilityNotifier in interface Datasetpublic String getDescription()
DatasetgetDescription in interface Datasetpublic String getDatasetIdentifier()
DatasetgetDatasetIdentifier in interface Datasetpublic long getLastModificationTime()
DatasetgetLastModificationTime in interface Datasetpublic Properties getInitializationDirectives()
public boolean initializeDataset()
throws DatasetException
DatasetinitializeDataset in interface Datasettrue if the dataset has been initialized;
false otherwise.DatasetExceptionpublic boolean isAvailable()
DatasetisAvailable in interface Datasettrue if the dataset is available;
false otherwise.public boolean isDataAvailable()
DatasetisDataAvailable in interface Datasettrue if data is available on this dataset;
false otherwise.public boolean isInitialized()
DatasetisInitialized in interface Datasettrue if the dataset is initialized;
false otherwise.public boolean supportsDataAvailabilityNotifications()
DatasetsupportsDataAvailabilityNotifications in interface Datasettrue if this dataset supports data availability
notifications;false otherwise.public int read(String filename, byte[] bytesToRead) throws DatasetException, IOException
FileAccessread in interface FileAccessfilename - 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
FileAccessread in interface FileAccessfileName - 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
FileAccesswrite in interface FileAccessfileName - 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
FileAccesswrite in interface FileAccessfileName - 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
FileAccessgetPosition in interface FileAccessfileName - 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
FileAccesssetPosition in interface FileAccessfileName - 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
FileAccesssize in interface FileAccessfileName - 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)
FileAccessisPartOfDataset in interface FileAccessfileName - 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.