|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
com.sun.cldc.i18n.StreamWriter
com.sun.cldc.i18n.j2me.UTF8_Writer
public class UTF8_Writer
Encodes characters in UTF-8. This does not support writing characters that directly require more than 3 UTF-8 encoded bytes. Surrogates, however, are supported.
Any unencodable characters are replaced in the stream with '?'.
| Field Summary |
|---|
| Fields inherited from class com.sun.cldc.i18n.StreamWriter |
|---|
out |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
UTF8_Writer()
Creates a new writer for UTF-8 encoded streams. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the writer. |
Writer |
open(OutputStream out,
String enc)
Opens the writer. |
int |
sizeOf(char[] array,
int offset,
int length)
Gets the size in bytes of an array of chars. |
void |
write(char[] cbuf,
int off,
int len)
Writes a portion of an array of characters. |
void |
write(int c)
Writes a single character. |
| Methods inherited from class com.sun.cldc.i18n.StreamWriter |
|---|
flush |
| Methods inherited from class java.io.Writer |
|---|
write, write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UTF8_Writer()
| Method Detail |
|---|
public void write(int c)
throws IOException
write in class Writerc - int specifying a character to be written
IOException - if an I/O error occurs.
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class Writercbuf - array of charactersoff - offset from which to start writing characterslen - number of characters to write
IOException - if an I/O error occurs.
public Writer open(OutputStream out,
String enc)
throws UnsupportedEncodingException
open in class StreamWriterout - the output streamenc - the character encoding
UnsupportedEncodingException - if specified encoding is not
supported.
public void close()
throws IOException
close in class StreamWriterIOException - if there was an I/O error while closing.
public int sizeOf(char[] array,
int offset,
int length)
sizeOf in class StreamWriter
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||