public class Slurpie extends Object
Constructor and Description |
---|
Slurpie() |
Modifier and Type | Method and Description |
---|---|
static BufferedReader |
getReader(String filename)
Get a reader for a file or URL.
|
static String |
slurp(BufferedReader br,
int numChars)
Slurp from a BufferedReader up to roughly numChars characters of data.
|
static String |
slurp(String filename)
Read the contents of a file.
|
static String |
slurp(String filename,
boolean ignoreErr) |
static String |
slurp(String filename,
int numChars)
Slurp in a filename up to a maximimum number of characters.
|
public static String slurp(String filename) throws IOException
filename
- file or URL.IOException
public static BufferedReader getReader(String filename) throws IOException
filename
- file or URL.IOException
public static String slurp(String filename, int numChars) throws IOException
filename
- file name or url.numChars
- maximum size in characters.IOException
public static String slurp(BufferedReader br, int numChars) throws IOException
br
- the buffered reader.numChars
- the number of characters to read.IOException
public static String slurp(String filename, boolean ignoreErr) throws IOException
IOException
Copyright © 2015. All rights reserved.