|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.marketcetera.util.unicode.UnicodeOutputStreamWriter
public class UnicodeOutputStreamWriter
A variation of OutputStreamWriter that is BOM-aware. It can
operate in any of the following modes:
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
|
UnicodeOutputStreamWriter(OutputStream stream)
Creates a new writer over the given stream that uses the default JVM charset (and no signature is injected). |
|
UnicodeOutputStreamWriter(OutputStream stream,
Reader reader)
Creates a new writer over the given stream that uses the actual signature/charset of the given reader. |
protected |
UnicodeOutputStreamWriter(OutputStream stream,
Reader reader,
boolean writeSignature)
Creates a new writer over the given stream that uses the actual signature/charset of the given reader. |
|
UnicodeOutputStreamWriter(OutputStream stream,
SignatureCharset requestedSignatureCharset)
Creates a new writer over the given stream that normally injects the given signature, and uses its associated charset for encoding. |
protected |
UnicodeOutputStreamWriter(OutputStream stream,
SignatureCharset requestedSignatureCharset,
boolean writeSignature)
Creates a new writer over the given stream that normally injects the given signature, and uses its associated charset for encoding. |
| Method Summary | |
|---|---|
Writer |
append(char c)
|
Writer |
append(CharSequence csq)
|
Writer |
append(CharSequence csq,
int start,
int end)
|
void |
close()
|
void |
flush()
|
SignatureCharset |
getRequestedSignatureCharset()
Returns the receiver's requested signature/charset. |
SignatureCharset |
getSignatureCharset()
Returns the receiver's actual signature/charset (that is, the one in use to encode the stream). |
void |
write(char[] cbuf)
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(String str)
|
void |
write(String str,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnicodeOutputStreamWriter(OutputStream stream)
stream - The stream.
protected UnicodeOutputStreamWriter(OutputStream stream,
SignatureCharset requestedSignatureCharset,
boolean writeSignature)
stream - The stream.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.writeSignature - True if a signature (if any) should be
written.
public UnicodeOutputStreamWriter(OutputStream stream,
SignatureCharset requestedSignatureCharset)
stream - The stream.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.
protected UnicodeOutputStreamWriter(OutputStream stream,
Reader reader,
boolean writeSignature)
throws IOException
UnicodeInputStreamReader, or if it
used the default JVM charset, then the writer uses the default
JVM charset (and no signature is injected). Signature injection
is also skipped if the given flag is set to false (even if the
given reader's signature/charset pair has a signature).
stream - The stream.reader - The reader.writeSignature - True if a signature (if any) should be
written.
IOException - Thrown if an I/O error occurs.
public UnicodeOutputStreamWriter(OutputStream stream,
Reader reader)
throws IOException
UnicodeInputStreamReader, or if it
used the default JVM charset, then the writer uses the default
JVM charset (and no signature is injected).
stream - The stream.reader - The reader.
IOException - Thrown if an I/O error occurs.| Method Detail |
|---|
public void write(int c)
throws IOException
write in class WriterIOException
public void write(char[] cbuf)
throws IOException
write in class WriterIOException
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOException
public void write(String str)
throws IOException
write in class WriterIOException
public void write(String str,
int off,
int len)
throws IOException
write in class WriterIOException
public Writer append(CharSequence csq)
throws IOException
append in interface Appendableappend in class WriterIOException
public Writer append(CharSequence csq,
int start,
int end)
throws IOException
append in interface Appendableappend in class WriterIOException
public Writer append(char c)
throws IOException
append in interface Appendableappend in class WriterIOException
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException
public void close()
throws IOException
close in interface Closeableclose in class WriterIOExceptionpublic SignatureCharset getRequestedSignatureCharset()
public SignatureCharset getSignatureCharset()
throws IOException
IOException - Thrown if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||