public class PicSlurper extends InOutToolOptions implements Iterable<InputStream>, Iterator<InputStream>
Modifier and Type | Field and Description |
---|---|
static String |
ALLOW_CONSOLE_LOGIN
System property name for whether twitter console login should be allowed
|
output
Constructor and Description |
---|
PicSlurper()
no args
|
PicSlurper(String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
handleStatus(twitter4j.Status status) |
boolean |
hasNext() |
Iterator<InputStream> |
iterator() |
static void |
loadConfig()
Load the configuration file which looks for twitter usernames and
passwords.
|
static void |
main(String[] args) |
InputStream |
next() |
void |
prepare()
prepare the tool for running
|
void |
remove() |
static File |
validateLocalOutput(String out,
boolean overwrite,
boolean contin)
Validate the (local) ouput from an String and return the corresponding
file.
|
getAllInputs, getInput, getInputFile, getOutput, isContinue, isForce, overwriteOutput, prepareMultivaluedArgument, setInput, setInputFile, setOutput
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
forEachRemaining
public static final String ALLOW_CONSOLE_LOGIN
public PicSlurper(String[] args)
args
- tool argumentspublic PicSlurper()
public void prepare()
public static File validateLocalOutput(String out, boolean overwrite, boolean contin) throws IOException
out
- where the file will gooverwrite
- whether to overwrite existing filescontin
- whether an existing output should be continued (i.e. ignored
if it exists)IOException
- if the file exists, but can't be deletedpublic boolean hasNext()
hasNext
in interface Iterator<InputStream>
public InputStream next()
next
in interface Iterator<InputStream>
public void remove()
remove
in interface Iterator<InputStream>
public void handleStatus(twitter4j.Status status)
status
- handle this statuspublic Iterator<InputStream> iterator()
iterator
in interface Iterable<InputStream>
public static void main(String[] args) throws IOException, TweetTokeniserException, InterruptedException
args
- IOException
TweetTokeniserException
InterruptedException
public static void loadConfig() throws FileNotFoundException, IOException
FileNotFoundException
IOException