to.etc.util
Class FileContentInfo
java.lang.Object
to.etc.util.FileContentInfo
public class FileContentInfo
- extends java.lang.Object
Helper class to determine a file's type (text, binary) and encoding (for text files). A file
is marked as "binary" if it contains nulls and is not recognized as a text file. This will
also determine a tab size either by scanning for defaults or by markers in the text.
- Author:
- Frits Jalvingh
Created on Feb 21, 2010
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createType
public static FileContentInfo createType(java.io.File src,
java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
load
protected void load()
throws java.lang.Exception
- Throws:
java.lang.Exception
getSource
public java.io.File getSource()
getName
public java.lang.String getName()
getEncoding
public java.lang.String getEncoding()
isText
public boolean isText()
getExtension
public java.lang.String getExtension()
getTabSize
public int getTabSize()
getMaxLineSize
public int getMaxLineSize()
getNumNulls
public int getNumNulls()
getNumUtf8
public int getNumUtf8()
getNumNonISO
public int getNumNonISO()
getNumHigh
public int getNumHigh()
getNumLines
public int getNumLines()
isEncodingValid
public boolean isEncodingValid()