T
- public class StreamTwitterStatusList<T extends USMFStatus> extends AbstractStreamBackedList<T> implements TwitterStatusList<T>
USMFStatus
instances using various methods.clz, consumed, headerLength, isBinary, recordLength, size
modCount
Modifier | Constructor and Description |
---|---|
protected |
StreamTwitterStatusList(InputStream stream,
int size,
boolean isBinary,
int headerLength,
int recordLength,
Class<? extends GeneralJSON> inputClass,
Class<T> instanceClass,
String charset) |
protected |
StreamTwitterStatusList(InputStream stream,
int size,
boolean isBinary,
int headerLength,
int recordLength,
Class<T> clazz) |
protected |
StreamTwitterStatusList(InputStream stream,
int size,
boolean isBinary,
int headerLength,
int recordLength,
Class<T> clazz,
String charset) |
Modifier and Type | Method and Description |
---|---|
String |
asciiHeader()
Header for ascii output.
|
byte[] |
binaryHeader()
Header for binary output.
|
protected T |
newElementInstance()
Override this id your instances can't be constructed with a no-args ctr
|
static <T extends USMFStatus> |
read(BufferedInputStream stream,
int nTweets,
Class<? extends GeneralJSON> inputClass,
Class<T> instanceClass,
String charset)
Construct a new StreamTwitterStatusList from the given input stream.
|
static <T extends USMFStatus> |
read(BufferedInputStream stream,
int nTweets,
Class<T> clz)
Construct a new StreamTwitterStatusList from the given input stream.
|
static <T extends USMFStatus> |
read(BufferedInputStream stream,
int nTweets,
Class<T> clazz,
String charset)
Construct a new StreamTwitterStatusList from the given input stream.
|
static StreamTwitterStatusList<USMFStatus> |
read(InputStream stream)
Construct a new StreamTwitterStatusList from the given input stream.
|
static StreamTwitterStatusList<USMFStatus> |
read(InputStream stream,
int nTweets)
Construct a new StreamTwitterStatusList from the given input stream.
|
static <T extends USMFStatus> |
read(InputStream stream,
int nTweets,
Class<? extends GeneralJSON> inputClass,
Class<T> instanceClass) |
static <T extends USMFStatus> |
read(InputStream stream,
int nTweets,
Class<T> clazz)
Construct a new StreamTwitterStatusList from the given input stream.
|
static StreamTwitterStatusList<USMFStatus> |
read(InputStream stream,
int nTweets,
String charset)
Construct a new StreamTwitterStatusList from the given input stream.
|
static StreamTwitterStatusList<USMFStatus> |
read(InputStream stream,
String charset)
Construct a new StreamTwitterStatusList from the given input stream.
|
static StreamTwitterStatusList<USMFStatus> |
readUSMF(InputStream stream,
Class<? extends GeneralJSON> generalJSON) |
static StreamTwitterStatusList<USMFStatus> |
readUSMF(InputStream stream,
Class<? extends GeneralJSON> generalJSON,
String charset) |
static StreamTwitterStatusList<USMFStatus> |
readUSMF(InputStream stream,
int nTweets,
Class<? extends GeneralJSON> generalJSON) |
static StreamTwitterStatusList<USMFStatus> |
readUSMF(InputStream stream,
int nTweets,
Class<? extends GeneralJSON> generalJSON,
String charset) |
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.
|
consumed, listIterator, randomSubList, readRecord, readRecordASCII, remaining, size
add, addAll, get, iterator, remove, set
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, 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 StreamTwitterStatusList(InputStream stream, int size, boolean isBinary, int headerLength, int recordLength, Class<T> clazz, String charset) throws IOException
IOException
protected StreamTwitterStatusList(InputStream stream, int size, boolean isBinary, int headerLength, int recordLength, Class<? extends GeneralJSON> inputClass, Class<T> instanceClass, String charset) throws IOException
IOException
protected StreamTwitterStatusList(InputStream stream, int size, boolean isBinary, int headerLength, int recordLength, Class<T> clazz) throws IOException
IOException
protected T newElementInstance()
AbstractStreamBackedList
newElementInstance
in class AbstractStreamBackedList<T extends USMFStatus>
public static StreamTwitterStatusList<USMFStatus> read(InputStream stream, int nTweets) throws IOException
stream
- the input streamnTweets
- of tweets to read from this streamIOException
- if an error occurs reading from the streampublic static StreamTwitterStatusList<USMFStatus> read(InputStream stream) throws IOException
stream
- the input streamIOException
- if an error occurs reading from the streampublic static StreamTwitterStatusList<USMFStatus> read(InputStream stream, int nTweets, String charset) throws IOException
stream
- the input streamnTweets
- of tweets to read from this streamcharset
- the charset used to read the streamIOException
- if an error occurs reading from the streampublic static StreamTwitterStatusList<USMFStatus> read(InputStream stream, String charset) throws IOException
stream
- the input streamcharset
- the charset of the underlying streamIOException
- if an error occurs reading from the streampublic static <T extends USMFStatus> StreamTwitterStatusList<T> read(InputStream stream, int nTweets, Class<T> clazz) throws IOException
T
- the type of the USMFStatus instances returnedstream
- the input streamnTweets
- of tweets to read from this streamclazz
- the class to instantiateIOException
- if an error occurs reading from the streampublic static StreamTwitterStatusList<USMFStatus> readUSMF(InputStream stream, Class<? extends GeneralJSON> generalJSON) throws IOException
stream
- generalJSON
- IOException
public static StreamTwitterStatusList<USMFStatus> readUSMF(InputStream stream, Class<? extends GeneralJSON> generalJSON, String charset) throws IOException
stream
- generalJSON
- charset
- the charset to read withIOException
public static StreamTwitterStatusList<USMFStatus> readUSMF(InputStream stream, int nTweets, Class<? extends GeneralJSON> generalJSON, String charset) throws IOException
stream
- nTweets
- number of tweets to readgeneralJSON
- charset
- the charset to read withIOException
public static StreamTwitterStatusList<USMFStatus> readUSMF(InputStream stream, int nTweets, Class<? extends GeneralJSON> generalJSON) throws IOException
stream
- nTweets
- generalJSON
- IOException
public static <T extends USMFStatus> StreamTwitterStatusList<T> read(InputStream stream, int nTweets, Class<? extends GeneralJSON> inputClass, Class<T> instanceClass) throws IOException
T
- stream
- nTweets
- inputClass
- the class of used by the USMFStatus
instances to readinstanceClass
- the class of the USMFStatus
instancesIOException
public static <T extends USMFStatus> StreamTwitterStatusList<T> read(BufferedInputStream stream, int nTweets, Class<? extends GeneralJSON> inputClass, Class<T> instanceClass, String charset) throws IOException
T
- the instance typestream
- the input streamnTweets
- the number of tweets expectedinputClass
- the input classinstanceClass
- the instance classcharset
- the charset of the readerIOException
- if an error occurs reading from the streampublic static <T extends USMFStatus> StreamTwitterStatusList<T> read(BufferedInputStream stream, int nTweets, Class<T> clz) throws IOException
T
- the type of the USMFStats instances returnedstream
- the input streamnTweets
- of tweets to read from this streamclz
- the class of local feature to readIOException
- if an error occurs reading from the streampublic static <T extends USMFStatus> StreamTwitterStatusList<T> read(BufferedInputStream stream, int nTweets, Class<T> clazz, String charset) throws IOException
T
- the type of status instance returnedstream
- the input streamnTweets
- of tweets to read from this streamclazz
- the class of local feature to readcharset
- the charset to read withIOException
- if an error occurs reading from the streampublic void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outpublic String asciiHeader()
WriteableASCII
asciiHeader
in interface WriteableASCII
public 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