Package org.eclipse.jetty.util
Class ByteArrayISO8859Writer
- java.lang.Object
-
- java.io.Writer
-
- org.eclipse.jetty.util.ByteArrayISO8859Writer
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class ByteArrayISO8859Writer extends Writer
Byte Array ISO 8859 writer. This class combines the features of a OutputStreamWriter for ISO8859 encoding with that of a ByteArrayOutputStream. It avoids many inefficiencies associated with these standard library classes. It has been optimized for standard ASCII characters.
-
-
Constructor Summary
Constructors Constructor Description ByteArrayISO8859Writer()Constructor.ByteArrayISO8859Writer(byte[] buf)ByteArrayISO8859Writer(int capacity)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcapacity()voidclose()voiddestroy()voidensureSpareCapacity(int n)voidflush()byte[]getBuf()byte[]getByteArray()ObjectgetLock()voidresetWriter()voidsetLength(int l)intsize()intspareCapacity()voidwrite(char c)voidwrite(char[] ca)voidwrite(char[] ca, int offset, int length)voidwrite(String s)voidwrite(String s, int offset, int length)voidwriteTo(OutputStream out)
-
-
-
Method Detail
-
getLock
public Object getLock()
-
size
public int size()
-
capacity
public int capacity()
-
spareCapacity
public int spareCapacity()
-
setLength
public void setLength(int l)
-
getBuf
public byte[] getBuf()
-
writeTo
public void writeTo(OutputStream out) throws IOException
- Throws:
IOException
-
write
public void write(char c) throws IOException- Throws:
IOException
-
write
public void write(char[] ca) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(char[] ca, int offset, int length) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
write
public void write(String s) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String s, int offset, int length) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
flush
public void flush()
-
resetWriter
public void resetWriter()
-
close
public void close()
-
destroy
public void destroy()
-
ensureSpareCapacity
public void ensureSpareCapacity(int n) throws IOException- Throws:
IOException
-
getByteArray
public byte[] getByteArray()
-
-