JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.jdirect
Class StringUtil

java.lang.Object
  |
  +--com.apple.mrj.jdirect.StringUtil

public class StringUtil
extends Object

StringUtil is a utility class used by JDirect 3 classes to convert between Java strings, C-Strings, Pascal-Strings, and CFStrings.


Constructor Summary
StringUtil()
           
 
Method Summary
static String fromCFString(int cfstringRef)
          Creates a String from a CFStringRef
static String fromCString(byte[] cStr)
          Creates a Java String from a C style string
static String fromPascalString(byte[] pStr)
          Creates a Java String from a Pascal style string
static int toCFString(String str)
          Creates a CFStringRef from a Java String
static byte[] toCString(String str)
          Creates a C style string from a Java String
static byte[] toPascalString(String str)
          Creates a Pascal style string from a Java String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

toCFString

public static int toCFString(String str)
Creates a CFStringRef from a Java String

fromCFString

public static String fromCFString(int cfstringRef)
Creates a String from a CFStringRef

toCString

public static byte[] toCString(String str)
Creates a C style string from a Java String

fromCString

public static String fromCString(byte[] cStr)
Creates a Java String from a C style string

toPascalString

public static byte[] toPascalString(String str)
Creates a Pascal style string from a Java String

fromPascalString

public static String fromPascalString(byte[] pStr)
Creates a Java String from a Pascal style string

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.