rabbit.cache.ncache
Interface FileHandler<T>

Type Parameters:
T - the type of objects to read and write
All Known Implementing Classes:
HttpHeaderFileHandler

public interface FileHandler<T>

An object that can read and write objects to file.

Author:
Robert Olofsson

Method Summary
 T read(InputStream is)
          Read a T from the given stream.
 void write(OutputStream os, T t)
          Write a T to the given stream.
 

Method Detail

read

T read(InputStream is)
       throws IOException
Read a T from the given stream.

Parameters:
is - the stream to read from
Returns:
the object read
Throws:
IOException - if reading fails

write

void write(OutputStream os,
           T t)
           throws IOException
Write a T to the given stream.

Parameters:
os - the stream to write the object to
t - the object to write
Throws:
IOException - if writing fails