|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
net.ranides.assira.io.LocalReader
public class LocalReader
Klasa, która rozwiązuje odwieczny problem: z jakim plikiem jest skojarzony podany reader.
| Method Summary | |
|---|---|
void |
close()
|
File |
file()
Zwraca nazwę pliku skojarzonego z readerem. |
static LocalReader |
fromFile(File file)
Tworzy nowy reader ładujący z podanego pliku tekst w kodowaniu UTF8 |
static LocalReader |
fromFile(File file,
Charset charset)
Tworzy nowy reader ładujący z podanego pliku tekst w podanym jawnie kodowaniu o podanym jawnie kodowaniu |
static LocalReader |
fromStream(File path,
InputStream istream)
Tworzy nowy reader skojarzony z podaną nazwą pliku, czytający tekst w kodowaniu UTF8 z podanego strumienia |
static LocalReader |
fromStream(File path,
InputStream istream,
Charset charset)
Tworzy nowy reader skojarzony z podaną nazwą pliku, czytający tekst w podanym jawnie kodowaniu z podanego strumienia |
static LocalReader |
fromStream(InputStream istream)
Tworzy nowy anonimowy reader czytający tekst w kodowaniu UTF8 z podanego strumienia |
static LocalReader |
fromStream(InputStream istream,
Charset charset)
Tworzy nowy anonimowy reader czytający tekst w podanym jawnie kodowaniu z podanego strumienia |
static LocalReader |
fromText(File path,
String content)
Tworzy nowy reader skojarzony z podaną nazwą pliku zawierający podany tekst. |
static LocalReader |
fromText(String content)
Tworzy nowy anonimowy reader zawierający podany tekst. |
void |
mark(int readAheadLimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(char[] cbuf)
|
int |
read(char[] cbuf,
int off,
int len)
|
int |
read(CharBuffer target)
|
boolean |
ready()
|
void |
reset()
|
long |
skip(long n)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LocalReader fromFile(File file)
throws FileNotFoundException
file -
FileNotFoundException
public static LocalReader fromFile(File file,
Charset charset)
throws FileNotFoundException
file - charset -
FileNotFoundExceptionpublic static LocalReader fromText(String content)
content -
public static LocalReader fromText(File path,
String content)
path - content -
public static LocalReader fromStream(InputStream istream)
istream -
public static LocalReader fromStream(InputStream istream,
Charset charset)
istream - charset -
public static LocalReader fromStream(File path,
InputStream istream)
path - istream -
public static LocalReader fromStream(File path,
InputStream istream,
Charset charset)
path - istream - charset -
public File file()
public int read(CharBuffer target)
throws IOException
read in interface Readableread in class ReaderIOException
public int read()
throws IOException
read in class ReaderIOException
public int read(char[] cbuf)
throws IOException
read in class ReaderIOException
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOException
public long skip(long n)
throws IOException
skip in class ReaderIOException
public boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Reader
public void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOException
public void reset()
throws IOException
reset in class ReaderIOException
public void close()
throws IOException
close in interface Closeableclose in class ReaderIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||