java.lang.Object
com.trapezium.parse.InputStreamFactory
- public class InputStreamFactory
- extends java.lang.Object
Provides a static public method for creating
an InputStream from a String indicating a file or URL.
- Since:
- 1.0
- Version:
- 1.0, 17 Nov 1997
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamFactory
private InputStreamFactory()
getInputStream
public static java.io.InputStream getInputStream(java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.NoClassDefFoundError
- Creates an InputStream from a String indicating either a file or a URL.
First tries to construct a URL, if this fails, assume it is a file.
If using JDK 1.0.x, GZIPInputStream not available. If a GZIP file is
encountered, we attempt to use this class, exception is caught, null
returned.
getInputStream
public static java.io.InputStream getInputStream(java.io.File source)
throws java.io.IOException
- Get an InputStream from a File, handle gzipped files
getRawInputStream
public static java.io.InputStream getRawInputStream(java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.NoClassDefFoundError
- Convert a string url into an InputStream