xmlgraphics-commons 1.4

org.apache.xmlgraphics.image.loader.impl
Class ImageRawStream.ByteArrayStreamFactory

java.lang.Object
  extended by org.apache.xmlgraphics.image.loader.impl.ImageRawStream.ByteArrayStreamFactory
All Implemented Interfaces:
ImageRawStream.InputStreamFactory
Enclosing class:
ImageRawStream

public static class ImageRawStream.ByteArrayStreamFactory
extends java.lang.Object
implements ImageRawStream.InputStreamFactory

InputStream factory that wraps a byte array.


Constructor Summary
ImageRawStream.ByteArrayStreamFactory(byte[] data)
          Main constructor.
 
Method Summary
 void close()
          Closes the factory and releases any resources held open during the lifetime of this object.
 java.io.InputStream createInputStream()
          Creates and returns a new InputStream.
 boolean isUsedOnceOnly()
          Indicates whether this factory is only usable once or many times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRawStream.ByteArrayStreamFactory

public ImageRawStream.ByteArrayStreamFactory(byte[] data)
Main constructor.

Parameters:
data - the byte array
Method Detail

createInputStream

public java.io.InputStream createInputStream()
Creates and returns a new InputStream.

Specified by:
createInputStream in interface ImageRawStream.InputStreamFactory
Returns:
the new InputStream

close

public void close()
Closes the factory and releases any resources held open during the lifetime of this object.

Specified by:
close in interface ImageRawStream.InputStreamFactory

isUsedOnceOnly

public boolean isUsedOnceOnly()
Indicates whether this factory is only usable once or many times.

Specified by:
isUsedOnceOnly in interface ImageRawStream.InputStreamFactory
Returns:
true if the factory can only be used once

xmlgraphics-commons 1.4

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