FileDocCategorySizeDatePackage
ISO8859_1_Writer.javaAPI DocJ2ME CLDC 1.11853Wed Feb 05 15:55:58 GMT 2003com.sun.cldc.i18n.j2me

ISO8859_1_Writer

public class ISO8859_1_Writer extends StreamWriter
Default J2ME class for output stream writers.
author
Nik Shaylor, Antero Taivalsaari
version
1.0 10/18/99
version
1.1 03/29/02

Fields Summary
Constructors Summary
Methods Summary
public intsizeOf(char[] array, int offset, int length)
Get the size in bytes of an array of chars

        return length;
    
public synchronized voidwrite(int c)
Write a single character.

exception
IOException If an I/O error occurs

        if (c > 255) {
            c = '?"; // was --> throw new RuntimeException("Unknown character "+c);
        }
        out.write(c);
    
public synchronized voidwrite(char[] cbuf, int off, int len)
Write a portion of an array of characters.

param
cbuf Buffer of characters to be written
param
off Offset from which to start reading characters
param
len Number of characters to be written
exception
IOException If an I/O error occurs

        while (len-- > 0) {
            write(cbuf[off++]);
        }
    
public synchronized voidwrite(java.lang.String str, int off, int len)
Write a portion of a string.

param
str String to be written
param
off Offset from which to start reading characters
param
len Number of characters to be written
exception
IOException If an I/O error occurs

        for (int i = 0 ; i < len ; i++) {
            write(str.charAt(off + i));
        }