public final class MemoryClearingBuffer extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the buffer out, filling its cells with null.
|
byte[] |
getBytes()
|
char[] |
getChars()
|
static MemoryClearingBuffer |
newInstance(byte[] bytes)
Creates a new instance of MemoryClearingBuffer from a
byte[]. |
static MemoryClearingBuffer |
newInstance(char[] chars)
Creates a new instance of MemoryClearingBuffer from a
char[]. |
static MemoryClearingBuffer |
newInstance(char[] chars,
boolean trim,
boolean lowerCase)
Creates a new instance of MemoryClearingBuffer from a
char[], optionally performing whitespace trimming and
conversion to lower case. |
public static MemoryClearingBuffer newInstance(byte[] bytes)
byte[].bytes - A byte[]public static MemoryClearingBuffer newInstance(char[] chars)
char[].chars - A char[]public static MemoryClearingBuffer newInstance(char[] chars, boolean trim, boolean lowerCase)
char[], optionally performing whitespace trimming and
conversion to lower case.chars - A char[]trim - If true, whitespace will be trimmed off of both ends of the
char[]lowerCase - If true, the characters will be converted to lower casepublic void clear()
public byte[] getBytes()
public char[] getChars()
Copyright © 2009–2016 The Apache Software Foundation. All rights reserved.