Package ag.smaser.trip.filefilter
Class Conversion
java.lang.Object
ag.smaser.trip.filefilter.Conversion
- Direct Known Subclasses:
FileConversion
,NativeConversion
Represents the state of a running conversion.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Used by the Connectivity Framework to close this Conversion object.The name of the file to convert.abstract InputStream
Returns an I/O stream from which the file data can be read.The requested output file type for the conversion.long
User data associated with this conversion object.abstract boolean
Returns true if the file to convert resides on the local file system.abstract int
read
(byte[] data, int offset, int count) Read file data via delegate method provided by the calling program.
-
Method Details
-
close
public void close()Used by the Connectivity Framework to close this Conversion object. This method is invoked by the Connectivity Framework. A File Filter adapter implementation should not use it. -
getFileName
The name of the file to convert. There may not actually be a file on the file system that corresponds to this file name. Check the isLocalFile property to make sure. -
getOutputType
The requested output file type for the conversion.- Returns:
-
getUserData
public long getUserData()User data associated with this conversion object. -
isLocalFile
public abstract boolean isLocalFile()Returns true if the file to convert resides on the local file system. -
read
Read file data via delegate method provided by the calling program.You should use either this method to access file data or the input stream. Do not use both; once you use the input stream this method may no longer return any data.
- Parameters:
data
- Byte array to receive dataoffset
- Offset into the byte array at which data starts getting writtencount
- The number of bytes to read- Returns:
- The number of bytes actually read
- Throws:
Exception
-
getInputStream
Returns an I/O stream from which the file data can be read.You should use either this method to access file data or the read method. Do not use both; once you use the input stream, the read method may no longer return any data.
- Returns:
- A new InputStream object
- Throws:
Exception
- IOException if an input stream could not be created
-