JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.datatransfer
Class TranslationUtils

java.lang.Object
  |
  +--com.apple.mrj.datatransfer.TranslationUtils

Deprecated. As of MacOSX 10.2

public class TranslationUtils
extends Object

Static utilities for converting data formats; useful when working with Transferable objects.


Field Summary
static DataFlavor kTypeJavaFile
          Deprecated.  
 
Method Summary
static byte[] serializeToByteArray(Serializable ser)
          Deprecated. Serializes an object into a byte[] array.
static byte[] toByteArray(InputStream in)
          Deprecated. Reads an InputStream into a byte[] array.
static byte[] toByteArray(Object o)
          Deprecated. Attempts to convert an object into a byte[] array.
static byte[] toByteArray(Reader in)
          Deprecated. Reads a Reader into a byte[] array.
static char[] toCharArray(Reader in)
          Deprecated. Reads a Reader into a char[] array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kTypeJavaFile

public static final DataFlavor kTypeJavaFile
Deprecated. 
Method Detail

toByteArray

public static byte[] toByteArray(InputStream in)
                          throws IOException
Deprecated. 
Reads an InputStream into a byte[] array.

toByteArray

public static byte[] toByteArray(Reader in)
                          throws IOException
Deprecated. 
Reads a Reader into a byte[] array.

serializeToByteArray

public static byte[] serializeToByteArray(Serializable ser)
                                   throws IOException
Deprecated. 
Serializes an object into a byte[] array.

toByteArray

public static byte[] toByteArray(Object o)
                          throws IOException
Deprecated. 
Attempts to convert an object into a byte[] array. It knows how to handle InputStreams, Readers, and Serializable objects (which should be the only kinds of objects available from Transferables.) Other types of objects will cause an IOException to be thrown.

toCharArray

public static char[] toCharArray(Reader in)
                          throws IOException
Deprecated. 
Reads a Reader into a char[] array.

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.