KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > tools > OPP > srcgen > streamfactory > FileInputStreamFactory


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by SMB are
5
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
6
//
7
// $Id: $
8
package org.ozoneDB.tools.OPP.srcgen.streamfactory;
9
10 import java.io.InputStream JavaDoc;
11 import java.io.IOException JavaDoc;
12 import java.io.File JavaDoc;
13 import java.io.FileInputStream JavaDoc;
14
15 /**
16  *
17  * @author Joakim Ohlrogge
18  */

19 public class FileInputStreamFactory extends FileBasedStreamFactory implements InputStreamFactory {
20     public FileInputStreamFactory(File JavaDoc directory, String JavaDoc extension) {
21         super(directory, extension);
22     }
23
24     public InputStream JavaDoc newInstance(String JavaDoc className) throws IOException JavaDoc {
25         File JavaDoc file = getFile(className);
26         return new FileInputStream JavaDoc(file);
27     }
28 }
29
Popular Tags