KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > core > storage > gammaStore > StreamFactory


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Core License version 1 published by ozone-db.org.
3
//
4
// Copyright (C) 2003-@year@, Leo Mekenkamp. All rights reserved.
5
//
6
// $Id$
7

8 package org.ozoneDB.core.storage.gammaStore;
9
10 import java.io.IOException JavaDoc;
11 import java.io.InputStream JavaDoc;
12 import java.io.OutputStream JavaDoc;
13
14 /**
15  * <p>Factory pattern for creating streams which are 'inserted' into the
16  * serialization-to-stream process. Can be used for compression, encoding,
17  * buffering, etc.</p>
18  *
19  * @author <a HREF="mailto:leoATmekenkampD0Tcom">Leo Mekenkamp (mind the anti sp@m)</a>
20  * @version $Id$
21  */

22 public interface StreamFactory {
23     
24     /**
25      * <p>Creates an output stream that uses the given <code>OutputStream</code>
26      * as its output.
27      *
28      * @param out stream to use for output
29      */

30     public OutputStream JavaDoc createOutputStream(OutputStream JavaDoc out) throws IOException JavaDoc;
31     
32     /**
33      * <p>Creates an input stream that uses the given <code>InputStream</code>
34      * for its input.
35      *
36      * @param in stream to use for input
37      */

38     public InputStream JavaDoc createInputStream(InputStream JavaDoc in) throws IOException JavaDoc;
39     
40 }
Popular Tags