RSE
Release 1.0

org.eclipse.rse.services.clientserver.java
Class ClassFileUTF8Reader

java.lang.Object
  extended byorg.eclipse.rse.services.clientserver.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.

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.