Closeable
, Flushable
, Appendable
, AutoCloseable
public class ConvTableWriter extends OutputStreamWriter
ConvTableReader
Constructor | Description |
---|---|
ConvTableWriter(OutputStream out) |
Creates a ConvTableWriter that uses the default character encoding.
|
ConvTableWriter(OutputStream out,
int ccsid) |
Creates a ConvTableWriter that uses the specified CCSID.
|
ConvTableWriter(OutputStream out,
int ccsid,
int bidiStringType) |
Creates a ConvTableWriter that uses the specified CCSID and bi-directional string type.
|
ConvTableWriter(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(OutputStream out,
int ccsid,
BidiConversionProperties properties) |
Creates a ConvTableWriter that uses the specified CCSID and bi-directional string type.
|
ConvTableWriter(OutputStream out,
String encoding) |
Creates a ConvTableWriter that uses the specified character encoding.
|
Modifier and Type | Method | 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.
|
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(String data) |
Writes the specified String.
|
void |
write(String data,
int offset,
int length) |
Writes a portion of the specified String.
|
append, append
append, nullWriter
public ConvTableWriter(OutputStream out) throws UnsupportedEncodingException
out
- The OutputStream to which to write characters.UnsupportedEncodingException
- If the default character encoding or its associated CCSID is not supported.public ConvTableWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
out
- The OutputStream to which to write characters.encoding
- The name of a supported character encoding.UnsupportedEncodingException
- If the specified character encoding or its associated CCSID is not supported.public ConvTableWriter(OutputStream out, int ccsid) throws UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(OutputStream out, int ccsid, int bidiStringType) throws UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.bidiStringType
- The bi-directional string type
.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(OutputStream out, int ccsid, BidiConversionProperties properties) throws UnsupportedEncodingException
out
- The OutputStream to which to write characters.ccsid
- The CCSID.properties
- The bidi conversion properties.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public ConvTableWriter(OutputStream out, int ccsid, int bidiStringType, int cacheSize) throws 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.UnsupportedEncodingException
- If the specified CCSID or its corresponding character encoding is not supported.public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class OutputStreamWriter
IOException
- If an I/O exception occurs.public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStreamWriter
IOException
- If an I/O exception occurs.public int getCcsid()
public String getEncoding()
getEncoding
in class OutputStreamWriter
public void write(int c) throws IOException
write
in class OutputStreamWriter
c
- The character to write.IOException
- If an I/O exception occurs.public void write(char[] buffer) throws IOException
write
in class Writer
buffer
- The characters to be written.IOException
- If an I/O exception occurs.public void write(char[] buffer, int offset, int length) throws IOException
write
in class 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.IOException
- If an I/O exception occurs.public void write(String data) throws IOException
write
in class Writer
data
- The String to write.IOException
- If an I/O exception occurs.public void write(String data, int offset, int length) throws IOException
write
in class 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.IOException
- If an I/O exception occurs.Copyright © 2024. All rights reserved.