usb.jphoto
Class ObjectInfo

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

public class ObjectInfo
extends Data

ObjectInfo provides metadata such as image and thumbnail sizes for image objects; it describes associations; and identifies additional object types such as audio clips.

Note that in addition to the image formats identified here, devices could also support proprietary formats except for use with thumbnail images.


Field Summary
static int AIFF
          ObjectFormatCode:
static int ASF
          ObjectFormatCode:
static int Association
          ObjectFormatCode: associations include folders and panoramas
static int AVI
          ObjectFormatCode:
static int BMP
          ImageFormatCode: MS-Windows bitmap image format
static int CIFF
          ImageFormatCode: Canon camera image file format
static int DPOF
          ObjectFormatCode:
static int Executable
          ObjectFormatCode:
static int EXIF_JPEG
          ImageFormatCode: EXIF/JPEG version 2.1, the preferred format for thumbnails and for images.
static int FlashPix
          ImageFormatCode: FlashPix image format
static int GIF
          ImageFormatCode: Graphics Interchange Format (deprecated)
static int HTML
          ObjectFormatCode:
static int JFIF
          ImageFormatCode: JPEG File Interchange Format
static int JP2
          ImageFormatCode: JPEG 2000 baseline
static int JPX
          ImageFormatCode: JPEG 2000 extended
static int MP3
          ObjectFormatCode:
static int MPEG
          ObjectFormatCode:
static int PCD
          ImageFormatCode: PhotoCD Image Pac
static int PICT
          ImageFormatCode: Quickdraw image format
static int PNG
          ImageFormatCode: Portable Network Graphics
static int QuickTime
          ObjectFormatCode: QuickTime video
static int Script
          ObjectFormatCode:
static int Text
          ObjectFormatCode:
static int TIFF
          ImageFormatCode: Tag Image File Format
static int TIFF_EP
          ImageFormatCode: Uncompressed TIFF/EP, the alternate format for thumbnails.
static int TIFF_IT
          ImageFormatCode: TIFF for Information Technology (graphic arts)
static int Undefined
          ObjectFormatCode: unrecognized non-image format
static int UnknownImage
          ImageFormatCode: unknown image format
static int WAV
          ObjectFormatCode:
 
Constructor Summary
ObjectInfo(java.net.URLConnection conn, DeviceInfo devInfo, NameFactory f)
          Construct an ObjectInfo data packet using the object at the other end of the specified connection.
 
Method Summary
 java.lang.String getCodeName(int code)
          Subclasses override this to map PTP codes to their names; the results are always interned strings, so that they can be efficiently compared ("=", "!=") against constants.
 int getLength()
          Returns the overall length of this data block, including header.
 boolean isImage()
          Returns true for format codes that have the image type bit set.
 boolean isVideo()
          Returns true for some recognized video format codes.
 
Methods inherited from class usb.jphoto.Data
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
 

Field Detail

Undefined

public static final int Undefined
ObjectFormatCode: unrecognized non-image format

Association

public static final int Association
ObjectFormatCode: associations include folders and panoramas

Script

public static final int Script
ObjectFormatCode:

Executable

public static final int Executable
ObjectFormatCode:

Text

public static final int Text
ObjectFormatCode:

HTML

public static final int HTML
ObjectFormatCode:

DPOF

public static final int DPOF
ObjectFormatCode:

AIFF

public static final int AIFF
ObjectFormatCode:

WAV

public static final int WAV
ObjectFormatCode:

MP3

public static final int MP3
ObjectFormatCode:

AVI

public static final int AVI
ObjectFormatCode:

MPEG

public static final int MPEG
ObjectFormatCode:

ASF

public static final int ASF
ObjectFormatCode:

QuickTime

public static final int QuickTime
ObjectFormatCode: QuickTime video

UnknownImage

public static final int UnknownImage
ImageFormatCode: unknown image format

EXIF_JPEG

public static final int EXIF_JPEG
ImageFormatCode: EXIF/JPEG version 2.1, the preferred format for thumbnails and for images.

TIFF_EP

public static final int TIFF_EP
ImageFormatCode: Uncompressed TIFF/EP, the alternate format for thumbnails.

FlashPix

public static final int FlashPix
ImageFormatCode: FlashPix image format

BMP

public static final int BMP
ImageFormatCode: MS-Windows bitmap image format

CIFF

public static final int CIFF
ImageFormatCode: Canon camera image file format

GIF

public static final int GIF
ImageFormatCode: Graphics Interchange Format (deprecated)

JFIF

public static final int JFIF
ImageFormatCode: JPEG File Interchange Format

PCD

public static final int PCD
ImageFormatCode: PhotoCD Image Pac

PICT

public static final int PICT
ImageFormatCode: Quickdraw image format

PNG

public static final int PNG
ImageFormatCode: Portable Network Graphics

TIFF

public static final int TIFF
ImageFormatCode: Tag Image File Format

TIFF_IT

public static final int TIFF_IT
ImageFormatCode: TIFF for Information Technology (graphic arts)

JP2

public static final int JP2
ImageFormatCode: JPEG 2000 baseline

JPX

public static final int JPX
ImageFormatCode: JPEG 2000 extended
Constructor Detail

ObjectInfo

public ObjectInfo(java.net.URLConnection conn,
                  DeviceInfo devInfo,
                  NameFactory f)
Construct an ObjectInfo data packet using the object at the other end of the specified connection.
Throws:
java.lang.IllegalArgumentException - if the object uses an image format the device doesn't support, or if the object's content type is not recognized.
See Also:
BaselineInitiator.sendObjectInfo(usb.jphoto.ObjectInfo, int, int)
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

isImage

public boolean isImage()
Returns true for format codes that have the image type bit set.

isVideo

public boolean isVideo()
Returns true for some recognized video format codes.

getCodeName

public java.lang.String getCodeName(int code)
Description copied from class: Container
Subclasses override this to map PTP codes to their names; the results are always interned strings, so that they can be efficiently compared ("=", "!=") against constants. Such per-instance methods permit type-specific subclasses (and vendor extensions) to name their code values, invoking superclass methods to name all other codes.
Overrides:
getCodeName in class Data


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.