de.smartics.util.io
Interface StreamHandler

Package class diagram package 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-2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.