Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.util
Class StringHandle

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.util.QTHandleRef
                  |
                  +--quicktime.util.StringHandle

All Implemented Interfaces:
  quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

public class StringHandle
extends QTHandleRef
implements quicktime.jdirect.QuickTimeLib

This class is used to store 7bit ASCII value strings

Field Summary
`static int` | `kCStringFormat`
`static int` | `kPStringFormat`

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`StringHandle(java.lang.String str, int format)` Construct a handle from a java String.

Method Summary
`static StringHandle` | `fromCodecName(CodecName cn)` Get the name of the compressor component.
`void` | `fromJavaString(java.lang.String str)` Sets the String found in the handle to the java.lang.String characters.
`int` | `getFormat()` Returns true if the string stored in the handle is a C String, or false if it is a PString
`int` | `getStringLength()` Returns the length of the String that is stored in the StringHandle.
`java.lang.String` | `toJavaString()` Returns the String found in the Handle as a java.lang.String
`java.lang.String` | `toString()` Returns the String found in the Handle as a java.lang.String

Methods inherited from class quicktime.util.QTHandleRef
`copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, fromCompressionDialogState, fromSCSequence, getBytes, getSize, inMemory, isLocked, lock, lockHigh, moveHigh, toQTPointer, toQTPointer, unlock`

Methods inherited from class quicktime.QTObject
`disposeQTObject, equals, ID`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### kCStringFormat

    public static final int kCStringFormat

### kPStringFormat

    public static final int kPStringFormat

Constructor Detail

### StringHandle

    public StringHandle(java.lang.String str,
                        int format)
                 throws QTException

  Construct a handle from a java String. The string will only be stored as 7bit ASCII values - the full unicode specification of the Java String is lost in this conversion. You must supply information about how this String is to be formatted.
  Parameters:
    `str` - the Java string to store in the handle
    `format` - if kCStringFormat the string is formatted as a C string with a '\0' termination if kPStringFormat then the string is formatted as a PString with a count byte inserted at the start.

Method Detail

### fromCodecName

    public static StringHandle fromCodecName(CodecName cn)

  Get the name of the compressor component.
  Returns:
    the name.
  See Also:
    `CodecName.getName()`

### getStringLength

    public int getStringLength()

  Returns the length of the String that is stored in the StringHandle.
  Returns:
    the number of characters in this String

### getFormat

    public int getFormat()

  Returns true if the string stored in the handle is a C String, or false if it is a PString

### toJavaString

    public java.lang.String toJavaString()
                                  throws UtilException

  Returns the String found in the Handle as a java.lang.String
  Returns:
    java.lang.String representation

### fromJavaString

    public void fromJavaString(java.lang.String str)
                        throws UtilException

  Sets the String found in the handle to the java.lang.String characters. This will NOT grow the handle so that handle must be big enough to hold the new string
  Parameters:
    `str` - the characters that the StringHandle will be set to

### toString

    public java.lang.String toString()

  Returns the String found in the Handle as a java.lang.String
  Overrides:
    `toString` in class `QTHandleRef`
  Returns:
    java.lang.String representation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD