Remote Systems
v6.4.1

com.ibm.etools.systems.core.java
Class ClassFileUTF8Reader

java.lang.Object
  extended bycom.ibm.etools.systems.core.java.ClassFileUTF8Reader

public class ClassFileUTF8Reader
extends Object

This singleton class converts an array of unsigned bytes (represented by shorts) to UTF-8 strings as per the UTF-8 format that the JVM uses. Note that the JVM's version of UTF8 is different to the standard UTF-8 format.


Method Summary
static ClassFileUTF8Reader getInstance()
          Returns the singleton instance of the reader.
 String getString(short[] bytes)
          Returns a string given an unsigned array of bytes (represented as an array of shorts).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final ClassFileUTF8Reader getInstance()
Returns the singleton instance of the reader.

Returns:
the singleton instance.

getString

public String getString(short[] bytes)
Returns a string given an unsigned array of bytes (represented as an array of shorts). Converts to a string assuming the bytes represent the UTF8 format used by JVM.

Parameters:
bytes - the bytes.
Returns:
the string.

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.