Code example for CharsetDecoder

Methods: onMalformedInputonUnmappableCharacter

0
  public BytesToCharsetAdaptor(CharsetDecoder dec)
  { 
    decoder = dec;
    // Use default replacments on bad input so that we don't have to 
    // deal with errors. 
    decoder.onMalformedInput(CodingErrorAction.REPLACE);
    decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
  } 
 
  /** 
   * Return the decoder's name.  The backing Charset's name is 
   * returned. 
   * 
   * @return The name. 
   */ 
  public String getName()
  { 
    return EncodingHelper.getOldCanonical(decoder.charset().name());
  } 
 
  public int read(char[] outbuffer, int outpos, int count)