public class TextStore extends BinStore
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET
Default content charset to be used when no explicit charset
parameter is provided by the sender.
|
DEFAULT_THRESHOLD| Constructor and Description |
|---|
TextStore() |
TextStore(int sizeThreshold) |
TextStore(int sizeThreshold,
byte[] data) |
TextStore(String string) |
| Modifier and Type | Method and Description |
|---|---|
String |
getString()
Returns the contents of the file as a String, using the default
character encoding.
|
String |
getString(String charset)
Returns the contents of the file as a String, using the specified
encoding.
|
void |
set(String string)
Sets the contents using a String as a source
|
void |
set(String string,
String charset)
Sets the contents using a String as a source
|
delete, finalize, get, getInputStream, getOutputStream, getOutputStream, getSize, getStoreLocation, getTempFile, isInMemory, set, set, set, toString, writepublic static final String DEFAULT_CHARSET
public TextStore()
public TextStore(int sizeThreshold)
public TextStore(String string)
public TextStore(int sizeThreshold,
byte[] data)
public void set(String string)
string - The string with the datapublic void set(String string, String charset) throws UnsupportedEncodingException
string - The string with the datacharset - The Charset of the stringUnsupportedEncodingExceptionpublic String getString(String charset) throws UnsupportedEncodingException
BinStore.get() to retrieve the
contents of the file.charset - The charset to use.UnsupportedEncodingException - if the requested character
encoding is not available.public String getString()
BinStore.get() to retrieve the
contents of the file.Copyright © 2019. All rights reserved.