@OpenApiAll
public class RTFImageOutputStream
extends java.io.OutputStream
Modifier and Type | Field and Description |
---|---|
static int |
WMF_PLACEABLE_HEADER_SIZE
The number of WMF header length.
|
Constructor and Description |
---|
RTFImageOutputStream(java.io.Writer writer,
java.lang.String imageType)
Create RTF image output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this output stream and releases any system resources associated with this stream.
|
long |
getTotalWrittenChars()
Return total characters has been written.
|
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array starting at offset off to this byte
RTF image output stream. |
void |
write(int b)
Writes the specified byte to this RTF image output stream.
|
protected void |
writeHex(byte b)
Write hexadecimal string.
|
public static final int WMF_PLACEABLE_HEADER_SIZE
public RTFImageOutputStream(java.io.Writer writer, java.lang.String imageType)
writer
- the stream to write the converted imageimageType
- target image typeprotected void writeHex(byte b) throws java.io.IOException
b
- a bytejava.io.IOException
- when IO error occurredpublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the byte to be written.java.io.IOException
- if an I/O error occurs. In particular, an IOException
may be thrown if the
output stream has been closed.public void write(byte[] b, int off, int len) throws java.io.IOException
len
bytes from the specified byte array starting at offset off
to this byte
RTF image output stream.write
in class java.io.OutputStream
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.java.io.IOException
- if an I/O error occurs. In particular, an IOException
may be thrown if the
output stream has been closed.public long getTotalWrittenChars()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- if an I/O error occurs.Copyright © 2010 - No Magic Asia