|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.entry.EntryName
de.schlichtherle.truezip.fs.FsEntryName
@Immutable @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public final class FsEntryName
Addresses an entry in a file system relative to its mount point.
A file system entry name is usually constructed from a
Uniform Resource Identifier in order to assert the following
additional syntax constraints:
"." and ".." segments.
".".
"..".
"/".
"./".
"../".
"/".
Examples for valid file system entry name URIs are:
foo
foo/bar
/foo (leading slash separator not allowed)
foo/ (trailing slash separator not allowed)
foo/. (not normalized)
foo/.. (not normalized)
This class supports serialization with both
ObjectOutputStream and XMLEncoder.
FsEntry.getName(),
Serialized Form| Field Summary | |
|---|---|
static FsEntryName |
ROOT
The file system entry name of the root directory, which is an empty URI. |
private static long |
serialVersionUID
|
| Fields inherited from class de.schlichtherle.truezip.entry.EntryName |
|---|
SEPARATOR, SEPARATOR_CHAR |
| Constructor Summary | |
|---|---|
FsEntryName(FsEntryName parent,
FsEntryName member)
Constructs a new file system entry name by resolving the given member file system entry name against the given parent file system entry name. |
|
FsEntryName(String uri)
Equivalent to new FsEntryName(uri, FsUriModifier.NULL). |
|
FsEntryName(String uri,
FsUriModifier modifier)
Constructs a new file system entry name by calling new URI(uri) and parsing the resulting URI. |
|
FsEntryName(URI uri)
Equivalent to new FsEntryName(uri, FsUriModifier.NULL). |
|
FsEntryName(URI uri,
FsUriModifier modifier)
Constructs a new file system entry name by parsing the given URI. |
|
| Method Summary | |
|---|---|
static FsEntryName |
create(String uri)
Equivalent to create(uri, FsUriModifier.NULL). |
static FsEntryName |
create(String uri,
FsUriModifier modifier)
Constructs a new file system entry name by constructing a new URI from the given string representation and parsing the result. |
static FsEntryName |
create(URI uri)
Equivalent to create(uri, FsUriModifier.NULL). |
static FsEntryName |
create(URI uri,
FsUriModifier modifier)
Constructs a new file system entry name by parsing the given URI. |
private boolean |
invariants()
|
boolean |
isRoot()
|
private void |
parse(URI uri)
|
private static String |
quote(Object s)
|
private void |
readObject(ObjectInputStream in)
|
| Methods inherited from class de.schlichtherle.truezip.entry.EntryName |
|---|
compareTo, equals, getPath, getQuery, getUri, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
public static final FsEntryName ROOT
| Constructor Detail |
|---|
public FsEntryName(String uri)
throws URISyntaxException
new FsEntryName(uri, FsUriModifier.NULL).
URISyntaxException
public FsEntryName(String uri,
FsUriModifier modifier)
throws URISyntaxException
new URI(uri) and parsing the resulting URI.
uri - the URI string representation.modifier - the URI modifier.
URISyntaxException - if uri does not conform to the
syntax constraints for entry names.
public FsEntryName(URI uri)
throws URISyntaxException
new FsEntryName(uri, FsUriModifier.NULL).
URISyntaxException
public FsEntryName(URI uri,
FsUriModifier modifier)
throws URISyntaxException
uri - the URI.modifier - the URI modifier.
NullPointerException - if uri is null.
URISyntaxException - if uri does not conform to the
syntax constraints for file system entry names.
FsEntryName(FsEntryName parent,
FsEntryName member)
EntryName.SEPARATOR, so calling this constructor with
"foo" and "bar" as the URIs for the parent and member
file system entry names respectively will result in the URI
"foo/bar" for the resulting file system entry name.
parent - an entry name for the parent.member - an entry name for the member.| Method Detail |
|---|
public static FsEntryName create(String uri)
create(uri, FsUriModifier.NULL).
public static FsEntryName create(String uri,
FsUriModifier modifier)
new FsEntryName(uri, modifier)
and wraps any thrown URISyntaxException in an
IllegalArgumentException.
uri - the URI string representation.modifier - the URI modifier.
IllegalArgumentException - if uri does not conform to the
syntax constraints for entry names.public static FsEntryName create(URI uri)
create(uri, FsUriModifier.NULL).
public static FsEntryName create(URI uri,
FsUriModifier modifier)
new FsEntryName(uri, modifier)
and wraps any thrown URISyntaxException in an
IllegalArgumentException.
uri - the URI.modifier - the URI modifier.
IllegalArgumentException - if uri does not conform to the
syntax constraints for entry names.
private void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
private void parse(URI uri)
throws URISyntaxException
URISyntaxExceptionprivate static String quote(Object s)
private boolean invariants()
public boolean isRoot()
|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||