public final void printLatin1(char[] buffer,int offset,int length) throws IOException {
  StreamImpl source=_source;
  if (source == null) {
    return;
  }
  byte[] writeBuffer=_writeBuffer;
  int writeLength=_writeLength;
  while (true) {
    int sublen=Math.min(length,writeBuffer.length - writeLength);
    for (int i=sublen - 1; i >= 0; i--) {
      char ch=buffer[offset + i];
      if (ch < 0x100) {
        writeBuffer[writeLength + i]=(byte)ch;
      }
 else {
        writeBuffer[writeLength + i]=LATIN1[ch];
      }
    }
    if (length == sublen) {
      _writeLength=writeLength + sublen;
      return;
    }
    writeLength+=sublen;
    offset+=sublen;
    length-=sublen;
    source.write(writeBuffer,0,writeLength,false);
    _position+=writeLength;
    _isFlushRequired=true;
    writeLength=0;
  }
}

public final void printLatin1 ( char [ ] buffer , int offset , int length ) throws IOException { StreamImpl source = _source ; if ( source == null ) { return ; } byte [ ] writeBuffer = _writeBuffer ; int writeLength = _writeLength ; while ( true ) { int sublen = Math . min ( length , writeBuffer . length - writeLength ) ; for ( int i = sublen - 1 ; i >= 0 ; i -- ) { char ch = buffer [ offset + i ] ; if ( ch < 0x100 ) { writeBuffer [ writeLength + i ] = ( byte ) ch ; } else { writeBuffer [ writeLength + i ] = LATIN1 [ ch ] ; } } if ( length == sublen ) { _writeLength = writeLength + sublen ; return ; } writeLength += sublen ; offset += sublen ; length -= sublen ; source . write ( writeBuffer , 0 , writeLength , false ) ; _position += writeLength ; _isFlushRequired = true ; writeLength = 0 ; } }
prints the character buffer to the stream encoded as latin1 .
