gnu.gcj.convert

Class BytesToCharsetAdaptor


public class BytesToCharsetAdaptor
extends BytesToUnicode

Adaptor class that allow any Charset to be used as a BytesToUnicode converter.

Field Summary

Fields inherited from class gnu.gcj.convert.BytesToUnicode

inbuffer, inlength, inpos

Fields inherited from class gnu.gcj.convert.IOConverter

iconv_byte_swap

Constructor Summary

BytesToCharsetAdaptor(Charset cs)
Create a new BytesToCharsetAdaptor for the given Charset.
BytesToCharsetAdaptor(CharsetDecoder dec)
Create a new BytesToCharsetAdaptor for the given CharsetDecoder.

Method Summary

void
done()
String
getName()
Return the decoder's name.
int
read(char[] outbuffer, int outpos, int count)

Methods inherited from class gnu.gcj.convert.BytesToUnicode

done, getDecoder, getDefaultDecoder, getName, read, setInput

Methods inherited from class gnu.gcj.convert.IOConverter

canonicalize

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

BytesToCharsetAdaptor

public BytesToCharsetAdaptor(Charset cs)
Create a new BytesToCharsetAdaptor for the given Charset.
Parameters:
cs - the Charset.

BytesToCharsetAdaptor

public BytesToCharsetAdaptor(CharsetDecoder dec)
Create a new BytesToCharsetAdaptor for the given CharsetDecoder.
Parameters:
dec - the CharsetDecoder.

Method Details

done

public void done()
Overrides:
done in interface BytesToUnicode

getName

public String getName()
Return the decoder's name. The backing Charset's name is returned.
Overrides:
getName in interface BytesToUnicode
Returns:
The name.

read

public int read(char[] outbuffer,
                int outpos,
                int count)
Overrides:
read in interface BytesToUnicode

Copyright (C) 2005 Free Software Foundation This file is part of libgcj. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details.