gnu.gcj.convert

Class Output_UTF8


public class Output_UTF8
extends UnicodeToBytes

Convert Unicode to UTF8.

Field Summary

boolean
standardUTF8
True if a surrogate pair should be emitted as a single UTF8 sequence.

Fields inherited from class gnu.gcj.convert.UnicodeToBytes

buf, count

Fields inherited from class gnu.gcj.convert.IOConverter

iconv_byte_swap

Method Summary

String
getName()
boolean
havePendingBytes()
Returns true when the converter has consumed some bytes that are not yet converted to characters because further continuation bytes are needed.
int
write(char[] inbuffer, int inpos, int inlength)
Convert chars to bytes.

Methods inherited from class gnu.gcj.convert.UnicodeToBytes

done, getDefaultEncoder, getEncoder, getName, havePendingBytes, setFinished, setOutput, write, write

Methods inherited from class gnu.gcj.convert.IOConverter

canonicalize

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

standardUTF8

public boolean standardUTF8
True if a surrogate pair should be emitted as a single UTF8 sequence. Otherwise, a surrogate pair is treated as two separate characters. Also, '\0' is emitted as {0} if true, and as {0xC0,0x80} if false.

Method Details

getName

public String getName()
Overrides:
getName in interface UnicodeToBytes

havePendingBytes

public boolean havePendingBytes()
Returns true when the converter has consumed some bytes that are not yet converted to characters because further continuation bytes are needed. Defaults to false, should be overridden by decoders that internally store some bytes.
Overrides:
havePendingBytes in interface UnicodeToBytes

write

public int write(char[] inbuffer,
                 int inpos,
                 int inlength)
Convert chars to bytes. Converted bytes are written to buf, starting at count.
Overrides:
write in interface UnicodeToBytes
Parameters:
inbuffer - source of characters to convert
inpos - index of initial character in inbuffer to convert
inlength - number of characters to convert
Returns:
number of chars converted Also, this.count is increment by the number of bytes converted.

Copyright (C) 1999, 2000, 2003, 2006 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.