|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Writer | +--java.io.OutputStreamWriter
Untamed:
Field Summary | |
private sun.nio.cs.StreamEncoder |
se
|
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
OutputStreamWriter(OutputStream out)
Enabled: Create an OutputStreamWriter that uses the default character encoding. |
|
OutputStreamWriter(OutputStream out,
java.nio.charset.Charset cs)
Enabled: Create an OutputStreamWriter that uses the given charset. |
|
OutputStreamWriter(OutputStream out,
java.nio.charset.CharsetEncoder enc)
Enabled: Create an OutputStreamWriter that uses the given charset encoder. |
|
OutputStreamWriter(OutputStream out,
String charsetName)
Enabled: Create an OutputStreamWriter that uses the named charset. |
Method Summary | |
void |
close()
Enabled: Close the stream. |
void |
flush()
Enabled: Flush the stream. |
(package private) void |
flushBuffer()
Flush the output buffer to the underlying byte stream, without flushing the byte stream itself. |
String |
getEncoding()
Enabled: Return the name of the character encoding being used by this stream. |
void |
write(char[] cbuf,
int off,
int len)
Enabled: Write a portion of an array of characters. |
void |
write(int c)
Enabled: Write a single character. |
void |
write(String str,
int off,
int len)
Enabled: Write a portion of a string. |
Methods inherited from class java.io.Writer |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final sun.nio.cs.StreamEncoder se
Constructor Detail |
public OutputStreamWriter(OutputStream out, String charsetName) throws UnsupportedEncodingException
out
- An OutputStreamcharsetName
- The name of a supported
charset
public OutputStreamWriter(OutputStream out)
out
- An OutputStreampublic OutputStreamWriter(OutputStream out, java.nio.charset.Charset cs)
out
- An OutputStreampublic OutputStreamWriter(OutputStream out, java.nio.charset.CharsetEncoder enc)
out
- An OutputStreamenc
- A charset encoderMethod Detail |
public String getEncoding()
If the encoding has an historical name then that name is returned; otherwise the encoding's canonical name is returned.
If this instance was created with the OutputStreamWriter(OutputStream, String)
constructor then the returned
name, being unique for the encoding, may differ from the name passed to
the constructor. This method may return null if the stream has
been closed.
null
if the stream has been closedjava.nio.charset.Charset
void flushBuffer() throws IOException
IOException
public void write(int c) throws IOException
write
in class Writer
c
- int specifying a character to be written.
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
cbuf
- Buffer of charactersoff
- Offset from which to start writing characterslen
- Number of characters to write
IOException
public void write(String str, int off, int len) throws IOException
write
in class Writer
str
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to write
IOException
public void flush() throws IOException
flush
in class Writer
IOException
public void close() throws IOException
close
in class Writer
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |