Modifier and Type | Field and Description |
---|---|
static String |
BASEXSUFFIX
Database file suffix.
|
static int |
BLOCKSIZE
Disk block/page size (4096).
|
static String |
BXSSUFFIX
Command script suffix.
|
static String |
CSVSUFFIX
CSV file suffix.
|
static int |
ENTRIES
Entries per block (256).
|
static String |
FILEPREF
File prefix.
|
static String |
GZSUFFIX
GZIP file suffix.
|
static String[] |
HTMLSUFFIXES
HTML suffixes.
|
static String |
JARSUFFIX
JAR file suffix.
|
static String |
JSONSUFFIX
JSON file suffix.
|
static String |
JSSUFFIX
JS file suffix.
|
static String |
LOGSUFFIX
XQuery log suffix.
|
static int |
MAXATTS
Maximum number of attributes (see bit layout in
Data class). |
static int |
NODEPOWER
Table node size power (4).
|
static int |
NODESIZE
Table node size power (16).
|
static long |
OFFCOMP
Offset for compressing texts (see bit layout in
Data class). |
static long |
OFFNUM
Offset for inlining numbers (see bit layout in
Data class). |
static String |
RAW
Directory for raw files.
|
static String |
TARGZSUFFIX
TGZIP file suffix.
|
static String |
TARSUFFIX
TAR file suffix.
|
static String |
TGZSUFFIX
TGZIP file suffix.
|
static String[] |
TXTSUFFIXES
Text suffixes.
|
static String |
XARSUFFIX
XAR file suffix.
|
static String |
XMLSUFFIX
XML file suffix.
|
static String[] |
XMLSUFFIXES
XML suffixes.
|
static String |
XQMSUFFIX
XQuery module suffix.
|
static String |
XQSUFFIX
XQuery file suffix.
|
static String[] |
XQSUFFIXES
XQuery suffixes.
|
static String[] |
XSLSUFFIXES
XSL suffixes.
|
static String |
ZIPSUFFIX
ZIP file suffix.
|
static String[] |
ZIPSUFFIXES
Archive suffixes.
|
Modifier and Type | Method and Description |
---|---|
String |
dbname()
Chops the path and the file suffix of the specified filename
and returns the database name.
|
String |
dir()
Returns the directory path.
|
boolean |
eq(IO io)
Compares the filename of the specified IO reference.
|
boolean |
exists()
Tests if the reference exists.
|
static IO |
get(String location)
Returns a class instance for the specified location string.
|
boolean |
hasSuffix(String... suffixes)
Tests if the file suffix matches the specified suffixes.
|
abstract InputSource |
inputSource()
Returns an input source.
|
abstract InputStream |
inputStream()
Returns an input stream.
|
boolean |
isArchive()
Checks if this file is an archive.
|
boolean |
isDir()
Tests if this is a directory instance.
|
long |
length()
Returns the file length.
|
void |
length(long length)
Sets the input length.
|
IO |
merge(String in)
Merges two paths.
|
String |
name()
Returns the name of the resource.
|
void |
name(String name)
Sets the name of the resource.
|
String |
path()
Returns the path.
|
abstract byte[] |
read()
Returns the binary contents.
|
abstract StreamSource |
streamSource()
Returns a stream source.
|
String |
string()
Returns the contents as string.
|
long |
timeStamp()
Returns the time stamp (modification date) of this file.
|
String |
toString() |
String |
url()
Creates a URL from the specified path.
|
public static final String BASEXSUFFIX
public static final String BXSSUFFIX
public static final String XQSUFFIX
public static final String XQMSUFFIX
public static final String XMLSUFFIX
public static final String ZIPSUFFIX
public static final String CSVSUFFIX
public static final String JSONSUFFIX
public static final String JARSUFFIX
public static final String JSSUFFIX
public static final String TARGZSUFFIX
public static final String TGZSUFFIX
public static final String GZSUFFIX
public static final String TARSUFFIX
public static final String XARSUFFIX
public static final String LOGSUFFIX
public static final String RAW
public static final String FILEPREF
public static final String[] XQSUFFIXES
public static final String[] ZIPSUFFIXES
public static final String[] XMLSUFFIXES
public static final String[] XSLSUFFIXES
public static final String[] HTMLSUFFIXES
public static final String[] TXTSUFFIXES
public static final int BLOCKSIZE
public static final int NODEPOWER
public static final int NODESIZE
public static final int ENTRIES
public static final int MAXATTS
Data
class).public static final long OFFNUM
Data
class).public static final long OFFCOMP
Data
class).public static IO get(String location)
Returns a class instance for the specified location string. The type of the returned instance depends on the string value:
If the content of the string value is known in advance, it is advisable to call the direct constructors of the correspondent sub class.location
- locationpublic abstract byte[] read() throws IOException
IOException
- I/O exceptionpublic final String string() throws IOException
IOException
- I/O exceptionpublic boolean exists()
true
for IO instances other than IOFile
.public boolean isDir()
false
for IO instances other than IOFile
.public boolean hasSuffix(String... suffixes)
suffixes
- suffixes to compare withpublic long timeStamp()
IOFile
.public void length(long length)
length
- lengthpublic long length()
public abstract InputSource inputSource()
public abstract StreamSource streamSource()
public abstract InputStream inputStream() throws IOException
IOException
- I/O exceptionpublic IO merge(String in)
in
- name/path to be appendedpublic final boolean isArchive()
public final String dbname()
public final String name()
public final void name(String name)
name
- file namepublic final String path()
public String url()
IOFile
.public String dir()
public boolean eq(IO io)
io
- io referenceCopyright © 2005–2015 BaseX Team. All rights reserved.