|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.i18n.EncodingWriter
public abstract class EncodingWriter
Abstract class for a character-to-byte encoding writer.
Implementations need to implementcreate
and write() at minimum. Efficient implementations will
also implement the write into a buffer.
Implementations should not buffer the bytes.
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
log
|
| Constructor Summary | |
|---|---|
EncodingWriter()
|
|
| Method Summary | |
|---|---|
EncodingWriter |
create()
Returns a new encoding writer using the saved writer. |
abstract EncodingWriter |
create(java.lang.String javaEncoding)
Returns a new encoding writer for the given stream and javaEncoding. |
java.lang.String |
getJavaEncoding()
Returns the Java encoding for the writer. |
void |
setJavaEncoding(java.lang.String encoding)
Sets the Java encoding for the writer. |
abstract void |
write(ByteAppendable os,
char ch)
Writes the next character using the correct encoding. |
void |
write(OutputStreamWithBuffer os,
char[] cbuf,
int off,
int len)
Writes a character buffer using the correct encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger log
| Constructor Detail |
|---|
public EncodingWriter()
| Method Detail |
|---|
public java.lang.String getJavaEncoding()
public void setJavaEncoding(java.lang.String encoding)
public abstract EncodingWriter create(java.lang.String javaEncoding)
javaEncoding - the JDK name for the encoding.
public EncodingWriter create()
public abstract void write(ByteAppendable os,
char ch)
throws java.io.IOException
ch - the character to write
java.io.IOException
public void write(OutputStreamWithBuffer os,
char[] cbuf,
int off,
int len)
throws java.io.IOException
cbuf - character buffer receiving the data.off - starting offset into the buffer.len - number of characters to write
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||