java.lang.Object
java.io.Writer
org.apache.jena.atlas.io.OutStreamUTF8
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static byte[]encode(int ch) Return a byte array with the UTF-8 encoding of the integervoidflush()voidoutput(int x) static voidoutput(OutputStream out, int ch) voidwrite(char[] b) voidwrite(char[] cbuf, int off, int len) voidwrite(int ch) voidvoidMethods inherited from class java.io.Writer
append, append, append, nullWriter
-
Constructor Details
-
OutStreamUTF8
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
output
public void output(int x) -
encode
public static byte[] encode(int ch) Return a byte array with the UTF-8 encoding of the integer -
output
- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-