Liking cljdoc? Tell your friends :D

jdk.io.CharArrayWriter

This class implements a character buffer that can be used as an Writer. The buffer automatically grows when data is written to the stream. The data can be retrieved using toCharArray() and toString().

Note: Invoking close() on this class has no effect, and methods of this class can be called after the stream has closed without generating an IOException.

This class implements a character buffer that can be used as an Writer.
The buffer automatically grows when data is written to the stream.  The data
can be retrieved using toCharArray() and toString().

Note: Invoking close() on this class has no effect, and methods
of this class can be called after the stream has closed
without generating an IOException.
raw docstring

->char-array-writerclj

(->char-array-writer)
(->char-array-writer initial-size)

Constructor.

Creates a new CharArrayWriter with the specified initial size.

initial-size - an int specifying the initial buffer size. - int

throws: java.lang.IllegalArgumentException - if initialSize is negative

Constructor.

Creates a new CharArrayWriter with the specified initial size.

initial-size - an int specifying the initial buffer size. - `int`

throws: java.lang.IllegalArgumentException - if initialSize is negative
raw docstring

appendclj

(append this csq)
(append this csq start end)

Appends a subsequence of the specified character sequence to this writer.

An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

 out.write(csq.subSequence(start, end).toString())

csq - The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null". - java.lang.CharSequence start - The index of the first character in the subsequence - int end - The index of the character following the last character in the subsequence - int

returns: This writer - java.io.CharArrayWriter

throws: java.lang.IndexOutOfBoundsException - If start or end are negative, start is greater than end, or end is greater than csq.length()

Appends a subsequence of the specified character sequence to this writer.

  An invocation of this method of the form out.append(csq, start,
 end) when csq is not null, behaves in
 exactly the same way as the invocation



     out.write(csq.subSequence(start, end).toString())

csq - The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null". - `java.lang.CharSequence`
start - The index of the first character in the subsequence - `int`
end - The index of the character following the last character in the subsequence - `int`

returns: This writer - `java.io.CharArrayWriter`

throws: java.lang.IndexOutOfBoundsException - If start or end are negative, start is greater than end, or end is greater than csq.length()
raw docstring

closeclj

(close this)

Close the stream. This method does not release the buffer, since its contents might still be required. Note: Invoking this method in this class will have no effect.

Close the stream.  This method does not release the buffer, since its
contents might still be required. Note: Invoking this method in this class
will have no effect.
raw docstring

flushclj

(flush this)

Flush the stream.

Flush the stream.
raw docstring

resetclj

(reset this)

Resets the buffer so that you can use it again without throwing away the already allocated buffer.

Resets the buffer so that you can use it again without
throwing away the already allocated buffer.
raw docstring

sizeclj

(size this)

Returns the current size of the buffer.

returns: an int representing the current size of the buffer. - int

Returns the current size of the buffer.

returns: an int representing the current size of the buffer. - `int`
raw docstring

to-char-arrayclj

(to-char-array this)

Returns a copy of the input data.

returns: an array of chars copied from the input data. - char[]

Returns a copy of the input data.

returns: an array of chars copied from the input data. - `char[]`
raw docstring

to-stringclj

(to-string this)

Converts input data to a string.

returns: the string. - java.lang.String

Converts input data to a string.

returns: the string. - `java.lang.String`
raw docstring

writeclj

(write this c)
(write this c off len)

Writes characters to the buffer.

c - the data to be written - char[] off - the start offset in the data - int len - the number of chars that are written - int

Writes characters to the buffer.

c - the data to be written - `char[]`
off - the start offset in the data - `int`
len - the number of chars that are written - `int`
raw docstring

write-toclj

(write-to this out)

Writes the contents of the buffer to another character stream.

out - the output stream to write to - java.io.Writer

throws: java.io.IOException - If an I/O error occurs.

Writes the contents of the buffer to another character stream.

out - the output stream to write to - `java.io.Writer`

throws: java.io.IOException - If an I/O error occurs.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close