org.openjena.atlas.io
Class OutStreamUTF8
java.lang.Object
java.io.Writer
org.openjena.atlas.io.OutStreamUTF8
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public final class OutStreamUTF8
- extends Writer
Output UTF-8 encoded data.
This class implements the "Modified UTF8" encoding rules (null -> C0 80)
It will encode any 16 bit value.
It can be used as a pure UTf-8 encoder.
- See Also:
InStreamUTF8
OutStreamUTF8
public OutStreamUTF8(OutputStream out)
write
public void write(char[] cbuf,
int off,
int len)
throws IOException
- Specified by:
write
in class Writer
- Throws:
IOException
write
public void write(int ch)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
write
public void write(char[] b)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
write
public void write(String str)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
write
public void write(String str,
int idx,
int len)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
output
public void output(int x)
output
public static void output(OutputStream out,
int ch)
throws IOException
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Specified by:
flush
in class Writer
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Writer
- Throws:
IOException
Licenced under the Apache License, Version 2.0