|
" 2013 FRC Java API " |
|||||||||
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.
Field Summary | |
---|---|
static String |
defaultEncoding
The name of the default character encoding - hardcoded here and in System.getProperty(). |
static boolean |
ISO8859_1_ONLY_SUPPORTED
If set to true, then ONLY support ISO8859_1 encodings, although aliases (such as "US_ASCII") are allowed. |
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 byte array to a char 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 |
static boolean |
isISO8859_1(String encodingName)
Is encodingName some variation of "ISO8859_1"? |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String defaultEncoding
public static final boolean ISO8859_1_ONLY_SUPPORTED
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 knownpublic 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 knownpublic static byte[] charToByteArray(char[] 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 knownpublic static boolean isISO8859_1(String encodingName)
encodingName
-
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |