de.enough.polish.browser.protocols
Class ResourceConnection
java.lang.Object
de.enough.polish.browser.protocols.ResourceConnection
- All Implemented Interfaces:
- Connection, InputConnection, OutputConnection, StreamConnection
public class ResourceConnection
- extends Object
- implements StreamConnection
A StreamConnection for resources from inside the application jar.
The urls of resources always start with resource://.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceConnection
public ResourceConnection(String url)
- Creates a new resource connection for the specified URL
- Parameters:
url - the URL, e.g. /image.png.
ResourceConnection
public ResourceConnection(InputStream in)
- Creates a new resource connection for the specified input stream.
- Parameters:
in - the input stream
close
public void close()
throws IOException
- Specified by:
close in interface Connection
- Throws:
IOException
openDataInputStream
public DataInputStream openDataInputStream()
throws IOException
- Specified by:
openDataInputStream in interface InputConnection
- Throws:
IOException
openDataOutputStream
public DataOutputStream openDataOutputStream()
throws IOException
- Specified by:
openDataOutputStream in interface OutputConnection
- Throws:
IOException
openInputStream
public InputStream openInputStream()
throws IOException
- Specified by:
openInputStream in interface InputConnection
- Throws:
IOException
openOutputStream
public OutputStream openOutputStream()
throws IOException
- Specified by:
openOutputStream in interface OutputConnection
- Throws:
IOException