org.shetline.io
Class ResourceInputStream
java.lang.Object
java.io.InputStream
org.shetline.io.ResourceInputStream
- All Implemented Interfaces:
- Closeable
public class ResourceInputStream
- extends InputStream
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
itsStream
protected InputStream itsStream
rootPath
protected static String rootPath
getFilesAsResources
protected static boolean getFilesAsResources
theApplet
protected static Applet theApplet
altWebHost
protected static String altWebHost
AS_RESOURCE
protected static final boolean AS_RESOURCE
- See Also:
- Constant Field Values
ResourceInputStream
public ResourceInputStream(String filePath)
throws FileNotFoundException
- Throws:
FileNotFoundException
ResourceInputStream
public ResourceInputStream(String filePath,
Class resourceOwnerClass)
throws FileNotFoundException
- Throws:
FileNotFoundException
getStreamForResource
protected InputStream getStreamForResource(String filePath,
Class resourceOwnerClass)
getUnderlyingStream
public InputStream getUnderlyingStream()
setRootPath
public static void setRootPath(String newRootPath)
setApplet
public static void setApplet(Applet anApplet)
setAlternateWebHost
public static void setAlternateWebHost(String webHost)
useFilesFromResources
public static void useFilesFromResources(boolean state)
extendFilePath
protected String extendFilePath(String filePath)
extendFilePath
protected String extendFilePath(String filePath,
boolean asResource)
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
mark
public void mark(int readLimit)
- Overrides:
mark
in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int offset,
int length)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException