org.mortbay.util

Class ByteArrayISO8859Writer


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.
Version:
$Revision: 1.14 $
Author:
Greg Wilkins (gregw)

Constructor Summary

ByteArrayISO8859Writer()
Constructor.
ByteArrayISO8859Writer(byte[] buf)
ByteArrayISO8859Writer(int capacity)
Constructor.

Method Summary

int
capacity()
void
close()
void
destroy()
void
ensureSpareCapacity(int n)
protected void
finalize()
void
flush()
byte[]
getBuf()
byte[]
getByteArray()
Object
getLock()
void
resetWriter()
void
setLength(int l)
int
size()
int
spareCapacity()
void
write(String s)
void
write(String s, int offset, int length)
void
write(char c)
void
write(char[] ca)
void
write(char[] ca, int offset, int length)
void
writeTo(OutputStream out)

Constructor Details

ByteArrayISO8859Writer

public ByteArrayISO8859Writer()
Constructor.

ByteArrayISO8859Writer

public ByteArrayISO8859Writer(byte[] buf)

ByteArrayISO8859Writer

public ByteArrayISO8859Writer(int capacity)
Constructor.
Parameters:
capacity - Buffer capacity

Method Details

capacity

public int capacity()

close

public void close()

destroy

public void destroy()

ensureSpareCapacity

public void ensureSpareCapacity(int n)
            throws IOException

finalize

protected void finalize()

flush

public void flush()

getBuf

public byte[] getBuf()

getByteArray

public byte[] getByteArray()

getLock

public Object getLock()

resetWriter

public void resetWriter()

setLength

public void setLength(int l)

size

public int size()

spareCapacity

public int spareCapacity()

write

public void write(String s)
            throws IOException

write

public void write(String s,
                  int offset,
                  int length)
            throws IOException

write

public void write(char c)
            throws IOException

write

public void write(char[] ca)
            throws IOException

write

public void write(char[] ca,
                  int offset,
                  int length)
            throws IOException

writeTo

public void writeTo(OutputStream out)
            throws IOException

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.