Package org.apache.xmlgraphics.io
Class Resource
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.xmlgraphics.io.Resource
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class Resource extends FilterInputStream
This class represents a resolved resource. The type property is used by XGC to identify the resource content.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description Resource(InputStream inputStream)Constructs a resource of 'unknown' type.Resource(String type, InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetType()-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
Resource
public Resource(String type, InputStream inputStream)
- Parameters:
type- resource typeinputStream- input stream of the resource
-
Resource
public Resource(InputStream inputStream)
Constructs a resource of 'unknown' type.- Parameters:
inputStream- input stream of the resource
-
-
Method Detail
-
getType
public String getType()
- Returns:
- the resource type
-
-