de.smartics.util.io
Interface StreamHandler

All Known Implementing Classes:
DirectoryStreamHandler, MemoryStreamHandler

public interface StreamHandler

Provides access to streams to read from and write to a destination. This is a simple method to abstract access to the file system.


Method Summary
 InputStream openToRead(String resourceId)
          Opens a stream to the given resource for reading.
 OutputStream openToWrite(String resourceId)
          Opens a stream to the given resource for writing.
 

Method Detail

openToRead

InputStream openToRead(String resourceId)
                       throws IOException
Opens a stream to the given resource for reading.

Parameters:
resourceId - the identifier of the resource that should be opened.
Returns:
the stream to the resource.
Throws:
IOException - on any problem opening the resource.

openToWrite

OutputStream openToWrite(String resourceId)
                         throws IOException
Opens a stream to the given resource for writing.

Parameters:
resourceId - the identifier of the resource that should be opened.
Returns:
the stream to the resource.
Throws:
IOException - on any problem opening the resource.


Copyright © 2011–2013 smartics. All rights reserved.