TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.fs
Class FsScheme

java.lang.Object
  extended by 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

Field Summary
private  String scheme
           
private static long serialVersionUID
           
 
Constructor Summary
FsScheme(String scheme)
          Constructs a new URI scheme by parsing the given string.
 
Method Summary
 int compareTo(FsScheme that)
           
static FsScheme create(String scheme)
          Constructs a new URI scheme by parsing the given string.
 boolean equals(Object that)
           
 int hashCode()
           
private static String quote(Object s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

scheme

private final String scheme
Constructor Detail

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.
Method Detail

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

TrueZIP Kernel 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.