de.schlichtherle.truezip.fs
Class FsScheme
java.lang.Object
de.schlichtherle.truezip.fs.FsScheme
- All Implemented Interfaces:
- Serializable, Comparable<FsScheme>
@Immutable
public final class FsScheme
- extends Object
- implements Serializable, Comparable<FsScheme>
Represents a URI scheme according to the syntax constraints
defined in RFC 2396:
Uniform Resource Identifiers (URI): Generic Syntax.
This class supports serialization with both
ObjectOutputStream and XMLEncoder.
- Author:
- Christian Schlichtherle
- See Also:
- Serialized Form
|
Constructor Summary |
FsScheme(String scheme)
Constructs a new URI scheme by parsing the given string. |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
scheme
private final String scheme
FsScheme
public FsScheme(@NonNull
String scheme)
throws URISyntaxException
- Constructs a new URI scheme by parsing the given string.
- Parameters:
scheme - the URI scheme.
- Throws:
URISyntaxException - if scheme does not conform to the
syntax constraints for URI schemes.
create
@NonNull
public static FsScheme create(String scheme)
- Constructs a new URI scheme by parsing the given string.
This static factory method calls
new FsScheme(scheme)
and wraps any thrown URISyntaxException in an
IllegalArgumentException.
- Parameters:
scheme - the URI scheme.
- Returns:
- A new scheme.
- Throws:
IllegalArgumentException - if scheme does not conform to
the syntax constraints for URI schemes.
quote
private static String quote(Object s)
equals
public boolean equals(Object that)
- Overrides:
equals in class Object
compareTo
public int compareTo(FsScheme that)
- Specified by:
compareTo in interface Comparable<FsScheme>
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.