Package com.globalmentor.io
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
-
-
Field Summary
-
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
-
Constructor Summary
Constructors Modifier Constructor Description DefaultURIAccessible()
Deprecated.Default constructor.DefaultURIAccessible(URIInputStreamable uriInputStreamable)
Deprecated.URI input stream locator constructor.protected
DefaultURIAccessible(URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable)
Deprecated.Full constructor.DefaultURIAccessible(URIOutputStreamable uriOutputStreamable)
Deprecated.URI output stream locator constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static URIAccessible
getDefaultURIAccessible()
Deprecated.java.io.InputStream
getInputStream(java.net.URI uri)
Deprecated.Returns an input stream for the given URI.java.io.OutputStream
getOutputStream(java.net.URI uri)
Deprecated.Returns an output stream for the given URI.char[]
getPassword()
Deprecated.java.lang.String
getUsername()
Deprecated.void
setPassword(char[] password)
Deprecated.Sets the user password.void
setUsername(java.lang.String username)
Deprecated.Sets the username.-
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Constructor Detail
-
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, ornull
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, ornull
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, ornull
if the default implementation should be used.uriOutputStreamable
- The implementation to use for accessing a URI for output, ornull
if the default implementation should be used.
-
-
Method Detail
-
getUsername
public java.lang.String getUsername()
Deprecated.- Returns:
- The username, or
null
for no user information.
-
setUsername
public void setUsername(java.lang.String username)
Deprecated.Sets the username.- Parameters:
username
- The username, ornull
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, ornull
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 java.io.InputStream getInputStream(java.net.URI uri) throws java.io.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 interfaceURIInputStreamable
- Parameters:
uri
- A URI to a resource.- Returns:
- An input stream to the contents of the resource represented by the given URI.
- Throws:
java.io.IOException
- Thrown if an I/O error occurred.
-
getOutputStream
public java.io.OutputStream getOutputStream(java.net.URI uri) throws java.io.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 interfaceURIOutputStreamable
- Parameters:
uri
- A URI to a resource.- Returns:
- An output stream to the contents of the resource represented by the given URI.
- Throws:
java.io.IOException
- Thrown if an I/O error occurred.
-
-