org.backsource.utils.io
Class CachedStreamFactory

java.lang.Object
  extended byorg.backsource.utils.lang.Factory
      extended byorg.backsource.utils.io.CachedStreamFactory
Direct Known Subclasses:
ByteCachedStreamFactory, DOMCachedStreamFactory, FileCachedStreamFactory

public abstract class CachedStreamFactory
extends Factory

Factory for CachedStream implementation.

The factory follows the pattern from JXAP and Factory, which means that the factory is used to get an implementing factory: from which the CachedStream is gotten. FACTORY_PROPERTY defines the name of the property.

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Field Summary
static java.lang.String FACTORY_PROPERTY
          The property name/key to use when configuring the factory: org.backsource.utils.io.CachedStreamFactory.
 
Constructor Summary
protected CachedStreamFactory()
           
 
Method Summary
abstract  CachedStream getCachedStream()
          Get the CachedStream implementation.
static CachedStreamFactory newInstance()
          Get the system configured CachedStreamFactory.
static CachedStreamFactory newInstance(java.lang.String clazz, boolean reversedOrder)
          Get the possibly locally configured CachedStreamFactory.
 
Methods inherited from class org.backsource.utils.lang.Factory
findInstance, getProperty, jarService, jarService, list, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_PROPERTY

public static final java.lang.String FACTORY_PROPERTY
The property name/key to use when configuring the factory: org.backsource.utils.io.CachedStreamFactory.

See Also:
Constant Field Values
Constructor Detail

CachedStreamFactory

protected CachedStreamFactory()
Method Detail

newInstance

public static CachedStreamFactory newInstance()
                                       throws java.lang.ClassNotFoundException
Get the system configured CachedStreamFactory.

See Factory to understand how the search order is used and how to configure a custom factory.The default is ByteCachedStream.A reverse search order is used!

Throws:
java.lang.ClassNotFoundException

newInstance

public static CachedStreamFactory newInstance(java.lang.String clazz,
                                              boolean reversedOrder)
                                       throws java.lang.ClassNotFoundException
Get the possibly locally configured CachedStreamFactory.

See Factory to understand how the search order is used and how to configure a custom factory.The default is ByteCachedStream.

Parameters:
clazz - the full classname of the factory to use, may be null.
reversedOrder - search in reverse order according to Factory.
Throws:
java.lang.ClassNotFoundException

getCachedStream

public abstract CachedStream getCachedStream()
Get the CachedStream implementation.



Copyright © 2000-2004 Backsource. All Rights Reserved.