org.ujmp.core.util.io
Class IntelligentFileReader
- java.lang.Object
-
- java.io.Reader
-
- org.ujmp.core.util.io.IntelligentFileReader
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable
public class IntelligentFileReader extends java.io.Reader
-
-
Constructor Summary
Constructors Constructor and Description IntelligentFileReader(java.io.File file)IntelligentFileReader(java.io.File file, java.lang.String encoding)IntelligentFileReader(java.io.InputStream inputStream)IntelligentFileReader(java.io.Reader reader)IntelligentFileReader(java.lang.String file)IntelligentFileReader(java.net.URLConnection connection)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()intgetLineNumber()static java.lang.Stringload(java.io.File filename)static java.lang.Stringload(java.io.InputStream stream)static java.lang.Stringload(java.io.Reader reader)static java.lang.Stringload(java.lang.String filename)static java.lang.Stringload(java.net.URL url)intread(char[] cbuf, int off, int len)static byte[]readBytes(java.io.File file)static byte[]readBytes(java.io.File file, int length)java.lang.StringreadLine()
-
-
-
Constructor Detail
-
IntelligentFileReader
public IntelligentFileReader(java.lang.String file)
-
IntelligentFileReader
public IntelligentFileReader(java.io.InputStream inputStream)
-
IntelligentFileReader
public IntelligentFileReader(java.io.Reader reader)
-
IntelligentFileReader
public IntelligentFileReader(java.io.File file)
-
IntelligentFileReader
public IntelligentFileReader(java.io.File file, java.lang.String encoding)
-
IntelligentFileReader
public IntelligentFileReader(java.net.URLConnection connection) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
readLine
public java.lang.String readLine()
-
close
public void close()
- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein classjava.io.Reader
-
getLineNumber
public int getLineNumber()
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOException- Specified by:
readin classjava.io.Reader- Throws:
java.io.IOException
-
load
public static java.lang.String load(java.lang.String filename)
-
load
public static java.lang.String load(java.io.File filename)
-
load
public static java.lang.String load(java.io.InputStream stream)
-
load
public static java.lang.String load(java.io.Reader reader)
-
readBytes
public static byte[] readBytes(java.io.File file)
-
readBytes
public static byte[] readBytes(java.io.File file, int length)
-
load
public static java.lang.String load(java.net.URL url) throws java.io.IOException- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG