Code example for CharBuffer

Methods: limitposition

0
   public NotifyingInputStreamReader(InputStream in, CharsetDecoder decoder)
   { 
      this.in = in;
      this.decoder = decoder;
      this.charBuffer = CharBuffer.wrap(new char[DEFAULT_INPUT_BUFFER_SIZE]);
      this.charBuffer.position(charBuffer.limit());
      this.readBuffer = new byte[DEFAULT_OUTPUT_BUFFER_SIZE];
      this.byteBuffer = ByteBuffer.wrap(readBuffer);
      this.byteBuffer.position(byteBuffer.limit());
   } 
 
   public void close() 
      throws IOException 
   { 
      in.close();
   } 
 
   /** 
    *  Fill charBuffer with new character data. This method returns if 
    *  either the charBuffer has been filled completely with decoded