|
TrueZIP Kernel 7.0-rc1 | ||||||||
| 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 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(String path,
String query)
Equivalent to create(path, query, FsUriModifier.NULL). |
static FsEntryName |
create(String path,
String query,
FsUriModifier modifier)
Constructs a new file system entry name by constructing a new URI from the given path and query elements 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(@NonNull
String uri)
throws URISyntaxException
new FsEntryName(uri, FsUriModifier.NULL).
URISyntaxException
public FsEntryName(@NonNull
String uri,
@NonNull
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(@NonNull
URI uri)
throws URISyntaxException
new FsEntryName(uri, FsUriModifier.NULL).
URISyntaxException
public FsEntryName(@NonNull
URI uri,
@NonNull
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(@NonNull
FsEntryName parent,
@NonNull
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 |
|---|
@NonNull
public static FsEntryName create(@NonNull
String uri)
create(uri, FsUriModifier.NULL).
@NonNull
public static FsEntryName create(@NonNull
String uri,
@NonNull
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.
@NonNull
public static FsEntryName create(@NonNull
String path,
@CheckForNull
String query)
create(path, query, FsUriModifier.NULL).
@NonNull
public static FsEntryName create(@NonNull
String path,
@CheckForNull
String query,
@NonNull
FsUriModifier modifier)
new FsEntryName(new URI(null, null, path, query, null), modifier)
and wraps any thrown URISyntaxException in an
IllegalArgumentException.
path - the path.query - the query.modifier - the URI modifier.
IllegalArgumentException - if uri does not conform to the
syntax constraints for entry names.
@NonNull
public static FsEntryName create(@NonNull
URI uri)
create(uri, FsUriModifier.NULL).
@NonNull
public static FsEntryName create(@NonNull
URI uri,
@NonNull
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(@NonNull
ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
private void parse(@NonNull
URI uri)
throws URISyntaxException
URISyntaxException
@NonNull
private static String quote(@NonNull
Object s)
private boolean invariants()
public boolean isRoot()
|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||