T
- public class FileTwitterStatusList<T extends USMFStatus> extends AbstractFileBackedList<T> implements TwitterStatusList<T>
charset, clz, file, headerLength, isBinary, recordLength, size
modCount
Modifier | Constructor and Description |
---|---|
protected |
FileTwitterStatusList(int size,
File file,
Class<T> clazz) |
protected |
FileTwitterStatusList(int size,
File file,
String charset,
Class<T> clazz) |
protected |
FileTwitterStatusList(int size,
File file,
String charset,
Class<T> clazz,
Class<? extends GeneralJSON> seedClass) |
Modifier and Type | Method and Description |
---|---|
String |
asciiHeader()
Header for ascii output.
|
byte[] |
binaryHeader()
Header for binary output.
|
protected T |
newElementInstance()
Override this if your instances can't be constructed with a no-args
constructor
|
protected AbstractFileBackedList<T> |
newInstance(int newSize,
boolean isBinary,
int newHeaderLength,
int recordLength,
File file) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f) |
static List<USMFStatus> |
readUSMF(File f,
Class<? extends GeneralJSON> generalJSON) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f,
int size) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f,
int size,
String charset,
Class<? extends GeneralJSON> generalJSON) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f,
String charset) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f,
String charset,
Class<? extends GeneralJSON> generalJSON) |
static FileTwitterStatusList<USMFStatus> |
readUSMF(File f,
String charset,
int size) |
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
add, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, randomSubList, readRecord, readRecordASCII, set, size, subList, toArray, toArray
add, addAll, clear, equals, hashCode, listIterator, listIterator, remove, removeRange
addAll, remove, removeAll, retainAll, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
randomSubList
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
protected FileTwitterStatusList(int size, File file, String charset, Class<T> clazz)
protected FileTwitterStatusList(int size, File file, String charset, Class<T> clazz, Class<? extends GeneralJSON> seedClass)
protected FileTwitterStatusList(int size, File file, Class<T> clazz)
public void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outprotected T newElementInstance()
AbstractFileBackedList
newElementInstance
in class AbstractFileBackedList<T extends USMFStatus>
public String asciiHeader()
WriteableASCII
asciiHeader
in interface WriteableASCII
public static FileTwitterStatusList<USMFStatus> readUSMF(File f) throws IOException
f
- USMFStatus
instances read from a file
assuming the USMFStatus
formatIOException
public static FileTwitterStatusList<USMFStatus> readUSMF(File f, String charset) throws IOException
f
- charset
- the charset for the readerUSMFStatus
instances read from a file
assuming the USMFStatus
formatIOException
public static FileTwitterStatusList<USMFStatus> readUSMF(File f, int size) throws IOException
f
- size
- number of statuses to readUSMFStatus
instances read from a file
assuming the USMFStatus
formatIOException
public static FileTwitterStatusList<USMFStatus> readUSMF(File f, String charset, int size) throws IOException
f
- charset
- the charset for the readersize
- number of statuses to readUSMFStatus
instances read from a file
assuming the USMFStatus
formatIOException
public static FileTwitterStatusList<USMFStatus> readUSMF(File f, String charset, Class<? extends GeneralJSON> generalJSON)
f
- charset
- the charset for the readergeneralJSON
- the input typeUSMFStatus
instances read from a file
using generalJSON as the input typepublic static FileTwitterStatusList<USMFStatus> readUSMF(File f, int size, String charset, Class<? extends GeneralJSON> generalJSON)
f
- charset
- the charset for the readergeneralJSON
- the input typesize
- number of statuses to readUSMFStatus
instances read from a file
using generalJSON as the input typepublic void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic byte[] binaryHeader()
WriteableBinary
binaryHeader
in interface WriteableBinary
protected AbstractFileBackedList<T> newInstance(int newSize, boolean isBinary, int newHeaderLength, int recordLength, File file)
newInstance
in class AbstractFileBackedList<T extends USMFStatus>
public static List<USMFStatus> readUSMF(File f, Class<? extends GeneralJSON> generalJSON)