|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
org.apache.xml.serializer.WriterToUTF8Buffered
This class writes unicode characters to a byte stream (java.io.OutputStream) as quickly as possible. It buffers the output in an internal buffer which must be flushed to the OutputStream when done. This flushing is done via the close() flush() or flushBuffer() method.
Constructor Summary | |
WriterToUTF8Buffered(OutputStream out)
Create an buffered UTF-8 writer. |
Method Summary | |
void |
close()
Close the stream, flushing it first. |
void |
directWrite(String s)
|
void |
flush()
Flush the stream. |
void |
flushBuffer()
Flush the internal buffer |
OutputStream |
getOutputStream()
Get the output stream where the events will be serialized to. |
void |
write(char[] chars,
int start,
int length)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
void |
write(String s)
Write a string. |
Methods inherited from class java.io.Writer |
write, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WriterToUTF8Buffered(OutputStream out) throws UnsupportedEncodingException
out
- the underlying output stream.
UnsupportedEncodingException
Method Detail |
public void write(int c) throws IOException
Subclasses that intend to support efficient single-character output should override this method.
c
- int specifying a character to be written.
IOException
- If an I/O error occurspublic void write(char[] chars, int start, int length) throws IOException
chars
- Array of charactersstart
- Offset from which to start writing characterslength
- Number of characters to write
IOException
- If an I/O error occurs
IOException
public void write(String s) throws IOException
s
- String to be written
IOException
- If an I/O error occurspublic void flushBuffer() throws IOException
IOException
public void flush() throws IOException
IOException
- If an I/O error occurs
IOException
public void close() throws IOException
IOException
- If an I/O error occurs
IOException
public OutputStream getOutputStream()
public void directWrite(String s) throws IOException
s
- A string with only ASCII characters
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |