Class DefaultURIAccessible

java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.globalmentor.io.DefaultURIAccessible
All Implemented Interfaces:
PropertyBindable, PropertyConstrainable, URIAccessible, URIInputStreamable, URIOutputStreamable
Direct Known Subclasses:
AbstractIOKit, AbstractViewIOKit, URIAccessibleModel

public class DefaultURIAccessible extends BoundPropertyObject implements URIAccessible
Deprecated.
Default implementation of a class that allows access to resources by providing input streams and indicating a base URI against which relative URIs should be resolved.
Author:
Garret Wilson
  • Constructor Details

    • DefaultURIAccessible

      public DefaultURIAccessible()
      Deprecated.
      Default constructor.
    • DefaultURIAccessible

      public DefaultURIAccessible(URIInputStreamable uriInputStreamable)
      Deprecated.
      URI input stream locator constructor.
      Parameters:
      uriInputStreamable - The implementation to use for accessing a URI for input, or null if the default implementation should be used.
    • DefaultURIAccessible

      public DefaultURIAccessible(URIOutputStreamable uriOutputStreamable)
      Deprecated.
      URI output stream locator constructor.
      Parameters:
      uriOutputStreamable - The implementation to use for accessing a URI for output, or null if the default implementation should be used.
    • DefaultURIAccessible

      protected DefaultURIAccessible(URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable)
      Deprecated.
      Full constructor.
      Parameters:
      uriInputStreamable - The implementation to use for accessing a URI for input, or null if the default implementation should be used.
      uriOutputStreamable - The implementation to use for accessing a URI for output, or null if the default implementation should be used.
  • Method Details

    • getUsername

      public String getUsername()
      Deprecated.
      Returns:
      The username, or null for no user information.
    • setUsername

      public void setUsername(String username)
      Deprecated.
      Sets the username.
      Parameters:
      username - The username, or null for no user information.
    • getPassword

      public char[] getPassword()
      Deprecated.
      Returns:
      The user password, or null for no user information.
    • setPassword

      public void setPassword(char[] password)
      Deprecated.
      Sets the user password.
      Parameters:
      password - The user password, or null for no user information.
    • getDefaultURIAccessible

      public static URIAccessible getDefaultURIAccessible()
      Deprecated.
      Returns:
      The lazily-created singleton default instance of a default implementation with no base URI and default stream access.
    • getInputStream

      public InputStream getInputStream(URI uri) throws IOException
      Deprecated.
      Returns an input stream for the given URI. The calling class has the responsibility for closing the input stream.
      Specified by:
      getInputStream in interface URIInputStreamable
      Parameters:
      uri - A URI to a resource.
      Returns:
      An input stream to the contents of the resource represented by the given URI.
      Throws:
      IOException - Thrown if an I/O error occurred.
    • getOutputStream

      public OutputStream getOutputStream(URI uri) throws IOException
      Deprecated.
      Returns an output stream for the given URI. The calling class has the responsibility for closing the output stream.
      Specified by:
      getOutputStream in interface URIOutputStreamable
      Parameters:
      uri - A URI to a resource.
      Returns:
      An output stream to the contents of the resource represented by the given URI.
      Throws:
      IOException - Thrown if an I/O error occurred.