usb.jphoto
Class FileSendData

java.lang.Object
  |
  +--usb.jphoto.Buffer
        |
        +--usb.jphoto.Container
              |
              +--usb.jphoto.Data
                    |
                    +--usb.jphoto.FileSendData

public class FileSendData
extends Data

Used with sendObject, this can read objects from files using a relatively small amount of in-memory buffering. That reduces system resource requirements for working with large files such as uncompressed TIF images supported by higher end imaging devices.

See Also:
BaselineInitiator.sendObject(usb.jphoto.Data)

Constructor Summary
FileSendData(java.net.URLConnection data, NameFactory f)
          Constructs a data object which fills the given underlying file.
 
Method Summary
 void close()
          Closes the underlying file.
 int getLength()
          Returns the overall length of this data block, including header.
 int read(byte[] buf, int off, int len)
          Reads object data from the underlying file.
 
Methods inherited from class usb.jphoto.Data
getCodeName, toString
 
Methods inherited from class usb.jphoto.Container
getBlockType, getBlockTypeName, getCode, getCodeString, getCodeString, getCodeType, getXID
 
Methods inherited from class usb.jphoto.Buffer
getS16, getS32, getS64, getS8, getString, getU16, getU8, nextS16, nextS16Array, nextS32, nextS32Array, nextS64, nextS64Array, nextS8, nextS8Array, nextString, nextU16, nextU16Array, nextU8, nextU8Array, put16, put32, put64, put8, putString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileSendData

public FileSendData(java.net.URLConnection data,
                    NameFactory f)
             throws java.io.IOException
Constructs a data object which fills the given underlying file.
Method Detail

getLength

public int getLength()
Description copied from class: Container
Returns the overall length of this data block, including header.
Overrides:
getLength in class Container

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Reads object data from the underlying file.

close

public void close()
           throws java.io.IOException
Closes the underlying file.


Associated source code is licenced under the GPL.
See http://jphoto.sourceforge.net
This documentation was derived from that source code on 2001-04-12.