public class ConvTableWriter
extends java.io.OutputStreamWriter
ConvTableReader
Constructor and Description |
---|
ConvTableWriter(java.io.OutputStream out)
Creates a ConvTableWriter that uses the default character encoding.
|
ConvTableWriter(java.io.OutputStream out,
int ccsid)
Creates a ConvTableWriter that uses the specified CCSID.
|
ConvTableWriter(java.io.OutputStream out,
int ccsid,
BidiConversionProperties properties)
Creates a ConvTableWriter that uses the specified CCSID and bi-directional string type.
|
ConvTableWriter(java.io.OutputStream out,
int ccsid,
int bidiStringType)
Creates a ConvTableWriter that uses the specified CCSID and bi-directional string type.
|
ConvTableWriter(java.io.OutputStream out,
int ccsid,
int bidiStringType,
int cacheSize)
Creates a ConvTableWriter that uses the specified CCSID, bi-directional string type, and internal cache size.
|
ConvTableWriter(java.io.OutputStream out,
java.lang.String encoding)
Creates a ConvTableWriter that uses the specified character encoding.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this ConvTableWriter and its underlying output stream.
|
void |
flush()
Flushes the underlying output stream.
|
int |
getCcsid()
Returns the CCSID used by this ConvTableWriter.
|
java.lang.String |
getEncoding()
Returns the encoding used by this ConvTableWriter.
|
void |
write(char[] buffer)
Writes the specified array of characters.
|
void |
write(char[] buffer,
int offset,
int length)
Writes a portion of the specified array of characters.
|
void |
write(int c)
Writes a single character.
|
void |
write(java.lang.String data)
Writes the specified String.
|
void |
write(java.lang.String data,
int offset,
int length)
Writes a portion of the specified String.
|
public ConvTableWriter(java.io.OutputStream out) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.java.io.UnsupportedEncodingException
- If the default character encoding or its associated CCSID is not supported.public ConvTableWriter(java.io.OutputStream out, java.lang.String encoding) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.encoding
- The name of a supported character encoding.java.io.UnsupportedEncodingException
- If the specified character encoding or its associated CCSID is not supported.public ConvTableWriter(java.io.OutputStream out, int ccsid) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.java.io.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(java.io.OutputStream out, int ccsid, int bidiStringType) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.bidiStringType
- The bi-directional string type
.java.io.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(java.io.OutputStream out, int ccsid, BidiConversionProperties properties) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.properties
- The bidi conversion properties.java.io.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(java.io.OutputStream out, int ccsid, int bidiStringType, int cacheSize) throws java.io.UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.bidiStringType
- The bi-directional string type
.cacheSize
- The number of characters to store in the internal buffer. The default is 1024. This number must be greater than zero.java.io.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStreamWriter
java.io.IOException
- If an I/O exception occurs.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStreamWriter
java.io.IOException
- If an I/O exception occurs.public int getCcsid()
public java.lang.String getEncoding()
getEncoding
in class java.io.OutputStreamWriter
public void write(int c) throws java.io.IOException
write
in class java.io.OutputStreamWriter
c
- The character to write.java.io.IOException
- If an I/O exception occurs.public void write(char[] buffer) throws java.io.IOException
write
in class java.io.Writer
buffer
- The characters to be written.java.io.IOException
- If an I/O exception occurs.public void write(char[] buffer, int offset, int length) throws java.io.IOException
write
in class java.io.OutputStreamWriter
buffer
- The characters to be written.offset
- The offset into the array from which to begin extracting characters to write.length
- The number of characters to write. If zero is specified, this method does nothing.java.io.IOException
- If an I/O exception occurs.public void write(java.lang.String data) throws java.io.IOException
write
in class java.io.Writer
data
- The String to write.java.io.IOException
- If an I/O exception occurs.public void write(java.lang.String data, int offset, int length) throws java.io.IOException
write
in class java.io.OutputStreamWriter
data
- The String to write.offset
- The offset into the String from which to begin extracting characters to write.length
- The number of characters to write. If zero is specified, this method does nothing.java.io.IOException
- If an I/O exception occurs.