xmlgraphics-commons 2.0.1

org.apache.xmlgraphics.io
Class Resource

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.apache.xmlgraphics.io.Resource
All Implemented Interfaces:
Closeable

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
Resource(InputStream inputStream)
          Constructs a resource of 'unknown' type.
Resource(String type, InputStream inputStream)
           
 
Method Summary
 String getType()
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource(String type,
                InputStream inputStream)
Parameters:
type - resource type
inputStream - 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

xmlgraphics-commons 2.0.1

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.