public class NativeConversion extends Conversion
Constructor and Description |
---|
NativeConversion(AdapterOutputType outputType,
java.lang.String filename,
long userdata)
Creates a new conversion object for the conversion of file data (e.g.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Used by the Connectivity Framework to close this Conversion object.
|
java.io.InputStream |
getInputStream()
Returns an input stream for the file data associated with this
Conversion object.
|
boolean |
isLocalFile()
Returns true if the file to convert exists on the local file system.
|
int |
read(byte[] data,
int offset,
int count)
Read file data.
|
getFileName, getOutputType, getUserData
public NativeConversion(AdapterOutputType outputType, java.lang.String filename, long userdata)
outputType
- The format to convert the file tofilename
- The (fully qualified) name of the file to convertuserdata
- Opaque user data (usually a pointer) provided via JNI.public void close()
Conversion
close
in class Conversion
public boolean isLocalFile()
isLocalFile
in class Conversion
public int read(byte[] data, int offset, int count) throws java.lang.Exception
You must use either this method to access file data or the input stream. Do not use both; once you use the input stream this method will no longer return any data.
read
in class Conversion
data
- Byte array to receive dataoffset
- Offset into the byte array at which data starts getting writtencount
- The number of bytes to readjava.lang.Exception
public java.io.InputStream getInputStream() throws java.lang.Exception
You must 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 will no longer return any data.
getInputStream
in class Conversion
java.lang.Exception
- IOException if the input stream could not be created