org.fossilec.odettej
Class VirtualFile

java.lang.Object
  extended by org.fossilec.odettej.VirtualFile

public class VirtualFile
extends java.lang.Object

Author:
Rafael Marins

Nested Class Summary
static class VirtualFile.MappingMode
          This enumeration serves to identify Virtual File mapping mode, whether it's for inputing or outputing.
 
Constructor Summary
VirtualFile(java.lang.String path, VirtualFile.MappingMode mode, RecordFormat recordFormat, int recordSize)
           
VirtualFile(java.lang.String path, VirtualFile.MappingMode mode, RecordFormat recordFormat, int recordSize, int restartOffset)
           
VirtualFile(java.lang.String path, VirtualFile.MappingMode mode, RecordFormat recordFormat, int recordSize, java.lang.String datasetName)
           
VirtualFile(java.lang.String path, VirtualFile.MappingMode mode, RecordFormat recordFormat, int recordSize, java.lang.String datasetName, int restartOffset)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 java.lang.String getDatasetName()
          Return the Dataset Name of the Virtual File being transfered, assigned by bilateral agreement.
 java.util.Date getDateTime()
          Return the file qualifier indicating the date and time the Virtual File was made avaiable for transmission.
 int getFileSize()
          Return the file size in 1K (1024 octets) blocks required at the Originator location to store the Virtual File.
This parameter is intended to provide only a good estimate of the Virtual File size.
 RecordFormat getFormat()
           
 VirtualFile.MappingMode getMode()
           
 int getOffset()
          Return the offset representing the restart position of the Virtual File being transfered.
 int getRecordCount()
           
 int getRecordSize()
           
 long getUnitCount()
           
 boolean isOpen()
           
 void setDateTime(java.util.Date date)
           
 void setupRestart(int restartOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualFile

public VirtualFile(java.lang.String path,
                   VirtualFile.MappingMode mode,
                   RecordFormat recordFormat,
                   int recordSize)
            throws OdetteFTPException
Throws:
OdetteFTPException

VirtualFile

public VirtualFile(java.lang.String path,
                   VirtualFile.MappingMode mode,
                   RecordFormat recordFormat,
                   int recordSize,
                   int restartOffset)
            throws OdetteFTPException
Throws:
OdetteFTPException

VirtualFile

public VirtualFile(java.lang.String path,
                   VirtualFile.MappingMode mode,
                   RecordFormat recordFormat,
                   int recordSize,
                   java.lang.String datasetName)
            throws OdetteFTPException
Throws:
OdetteFTPException

VirtualFile

public VirtualFile(java.lang.String path,
                   VirtualFile.MappingMode mode,
                   RecordFormat recordFormat,
                   int recordSize,
                   java.lang.String datasetName,
                   int restartOffset)
            throws OdetteFTPException
Throws:
OdetteFTPException
Method Detail

getDatasetName

public java.lang.String getDatasetName()
Return the Dataset Name of the Virtual File being transfered, assigned by bilateral agreement.

Returns:
String containing the Dataset Name.

getDateTime

public java.util.Date getDateTime()
Return the file qualifier indicating the date and time the Virtual File was made avaiable for transmission.

Returns:
Date representing the specific date and time which the Virtual File was made avaiable.

setDateTime

public void setDateTime(java.util.Date date)
                 throws OdetteFTPException
Throws:
OdetteFTPException

getFormat

public RecordFormat getFormat()

getOffset

public int getOffset()
Return the offset representing the restart position of the Virtual File being transfered. The count represent the record number if the record format is FIXED or VARIABLE, or the offset in 1K (1024 octets) blocks in case being UNSTRUCTURED or TEXTFILE.

Returns:
int offset position. zero if hasn't been set.

getMode

public VirtualFile.MappingMode getMode()

getFileSize

public int getFileSize()
                throws OdetteFTPException
Return the file size in 1K (1024 octets) blocks required at the Originator location to store the Virtual File.
This parameter is intended to provide only a good estimate of the Virtual File size.

Returns:
int File Size in 1K (1024 octets) blocks.
Throws:
OdetteFTPException

getRecordSize

public int getRecordSize()

getUnitCount

public long getUnitCount()
                  throws OdetteFTPException
Throws:
OdetteFTPException

getRecordCount

public int getRecordCount()
                   throws OdetteFTPException
Throws:
OdetteFTPException

setupRestart

public void setupRestart(int restartOffset)
                  throws OdetteFTPException
Throws:
OdetteFTPException

isOpen

public boolean isOpen()

close

public void close()
           throws OdetteFTPException
Throws:
OdetteFTPException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © 2005 ObjectWeb Consortium. All Rights Reserved.