jlibs.core.io
Class CharArrayWriter2

java.lang.Object
  extended by java.io.Writer
      extended by java.io.CharArrayWriter
          extended by jlibs.core.io.CharArrayWriter2
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class CharArrayWriter2
extends CharArrayWriter

This is an extension of CharArrayWriter.

You can get access to the internal char buffer using toCharSequence()

Author:
Santhosh Kumar T

Field Summary
 
Fields inherited from class java.io.CharArrayWriter
buf, count
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
CharArrayWriter2()
           
CharArrayWriter2(int initialSize)
           
CharArrayWriter2(Reader reader, int readBuffSize, boolean close)
           
 
Method Summary
 int readFrom(Reader reader, int readBuffSize, boolean close)
           
 CharArray toCharSequence()
          Returns the input data as CharArray.
Note that the internal buffer is not copied.
 
Methods inherited from class java.io.CharArrayWriter
append, append, append, close, flush, reset, size, toCharArray, toString, write, write, write, writeTo
 
Methods inherited from class java.io.Writer
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharArrayWriter2

public CharArrayWriter2()

CharArrayWriter2

public CharArrayWriter2(int initialSize)

CharArrayWriter2

public CharArrayWriter2(Reader reader,
                        int readBuffSize,
                        boolean close)
                 throws IOException
Throws:
IOException
Method Detail

toCharSequence

public CharArray toCharSequence()
Returns the input data as CharArray.
Note that the internal buffer is not copied.


readFrom

public int readFrom(Reader reader,
                    int readBuffSize,
                    boolean close)
             throws IOException
Throws:
IOException


Copyright © 2018. All rights reserved.