|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.cldc.i18n.Helper
public class Helper
This class provides general helper functions for the J2ME environment.
No application code should reference this class directly.
| Constructor Summary | |
|---|---|
Helper()
|
|
| Method Summary | |
|---|---|
static char[] |
byteToCharArray(byte[] buffer,
int offset,
int length)
Convert a byte array to a char array |
static char[] |
byteToCharArray(byte[] buffer,
int offset,
int length,
String enc)
Convert a byte array to a char array |
static byte[] |
charToByteArray(char[] buffer,
int offset,
int length)
Convert a char array to a byte array |
static byte[] |
charToByteArray(char[] buffer,
int offset,
int length,
String enc)
Convert a char array to a byte array |
static Reader |
getStreamReader(InputStream is)
Get a reader for an InputStream |
static Reader |
getStreamReader(InputStream is,
String name)
Get a reader for an InputStream |
static Writer |
getStreamWriter(OutputStream os)
Get a writer for an OutputStream |
static Writer |
getStreamWriter(OutputStream os,
String name)
Get a writer for an OutputStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Helper()
| Method Detail |
|---|
public static Reader getStreamReader(InputStream is)
is - The input stream the reader is for
public static Reader getStreamReader(InputStream is,
String name)
throws UnsupportedEncodingException
is - The input stream the reader is forname - The name of the decoder
UnsupportedEncodingException - If the encoding is not knownpublic static Writer getStreamWriter(OutputStream os)
os - The output stream the reader is for
public static Writer getStreamWriter(OutputStream os,
String name)
throws UnsupportedEncodingException
os - The output stream the reader is forname - The name of the decoder
UnsupportedEncodingException - If the encoding is not known
public static char[] byteToCharArray(byte[] buffer,
int offset,
int length)
buffer - The byte array bufferoffset - The offsetlength - The length
public static byte[] charToByteArray(char[] buffer,
int offset,
int length)
buffer - The char array bufferoffset - The offsetlength - The length
public static char[] byteToCharArray(byte[] buffer,
int offset,
int length,
String enc)
throws UnsupportedEncodingException
buffer - The byte array bufferoffset - The offsetlength - The lengthenc - The character encoding
UnsupportedEncodingException - If the encoding is not known
public static byte[] charToByteArray(char[] buffer,
int offset,
int length,
String enc)
throws UnsupportedEncodingException
buffer - The char array bufferoffset - The offsetlength - The lengthenc - The character encoding
UnsupportedEncodingException - If the encoding is not known
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||