|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.jackson.dataformat.csv.impl.TextBuffer
public final class TextBuffer
Helper class for efficiently aggregating parsed and decoded textual content
Constructor Summary | |
---|---|
TextBuffer(com.fasterxml.jackson.core.util.BufferRecycler allocator)
|
Method Summary | |
---|---|
char[] |
contentsAsArray()
|
BigDecimal |
contentsAsDecimal()
Convenience method for converting contents of the buffer into a BigDecimal . |
double |
contentsAsDouble()
Convenience method for converting contents of the buffer into a Double value. |
String |
contentsAsString()
|
char[] |
emptyAndGetCurrentSegment()
|
void |
ensureNotShared()
Method called to make sure that buffer is not using shared input buffer; if it is, it will copy such contents to private buffer. |
String |
finishAndReturn(int lastSegmentEnd,
boolean trimTrailingSpaces)
|
char[] |
finishCurrentSegment()
|
char[] |
getCurrentSegment()
|
int |
getCurrentSegmentSize()
|
char[] |
getTextBuffer()
|
int |
getTextOffset()
|
boolean |
hasTextAsCharacters()
|
void |
releaseBuffers()
|
void |
reset()
|
void |
resetWithShared(char[] buf,
int start,
int len)
|
void |
resetWithString(String value)
|
int |
size()
|
String |
toString()
Note: calling this method may not be as efficient as calling contentsAsString() , since it's not guaranteed that resulting
String is cached. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextBuffer(com.fasterxml.jackson.core.util.BufferRecycler allocator)
Method Detail |
---|
public void releaseBuffers()
public void reset()
public void resetWithShared(char[] buf, int start, int len)
public void resetWithString(String value)
public int size()
public int getTextOffset()
public boolean hasTextAsCharacters()
public char[] getTextBuffer()
public String contentsAsString()
public char[] contentsAsArray()
public BigDecimal contentsAsDecimal() throws NumberFormatException
BigDecimal
.
NumberFormatException
public double contentsAsDouble() throws NumberFormatException
NumberFormatException
public void ensureNotShared()
public char[] getCurrentSegment()
public final char[] emptyAndGetCurrentSegment()
public int getCurrentSegmentSize()
public String finishAndReturn(int lastSegmentEnd, boolean trimTrailingSpaces)
lastSegmentEnd
- End offset in the currently active segmenttrimTrailingSpaces
- Whether trailing spaces should be trimmed or notpublic char[] finishCurrentSegment()
public String toString()
contentsAsString()
, since it's not guaranteed that resulting
String is cached.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |