|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--usb.jphoto.Buffer | +--usb.jphoto.Container
PTP Command, Data, Response, and Event blocks use a "Generic Container Structure" as a packet header.
Note that since the string values to which various codes map have been interned, you may safely rely on "==" and "!=" when you make comparisons against constant values.
Method Summary | |
int |
getBlockType()
Returns the overall type of this data block as a coded integer. |
static java.lang.String |
getBlockTypeName(int type)
Returns an interned string, normally "command", "data", "response", or "event", corresponding to the coded type. |
int |
getCode()
Returns the operation, response, or event code of this block. |
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. |
java.lang.String |
getCodeString()
Returns an interned string with name of this container's code. |
static java.lang.String |
getCodeString(int code)
Returns an interned string with the hexadecimal value of the specified container code. |
static java.lang.String |
getCodeType(int code)
Returns an interned string identifying the type of code field, such as "OperationCode", "ResponseCode", "ObjectFormatCode", "EventCode", or "DevicePropsCode". |
int |
getLength()
Returns the overall length of this data block, including header. |
int |
getXID()
Returns the ID of the transaction this block is associated with. |
java.lang.String |
toString()
Provides a printable representation of data from the block header, including block type, code, and transaction ID. |
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 |
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public int getLength()
public final int getBlockType()
public static final java.lang.String getBlockTypeName(int type)
public final int getCode()
public static final java.lang.String getCodeType(int code)
public java.lang.String getCodeName(int code)
public final java.lang.String getCodeString()
public static java.lang.String getCodeString(int code)
public final int getXID()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |