com.jrockit.mc.flightrecorder.spi
Class StreamProvider

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.spi.Provider
      extended by com.jrockit.mc.flightrecorder.spi.StreamProvider

public abstract class StreamProvider
extends Provider

Abstract base class for providers that can create an IRepository from a InputStream

Author:
Erik Gahlin

Constructor Summary
StreamProvider()
           
 
Method Summary
 IRepository createRepository()
          Create the IRepository for the provider.
abstract  IRepository createRepositoryFromStream(java.io.InputStream inputStream)
          Create an IRepository from an InputStream
 java.io.InputStream getInputStream()
          Returns the InputStream used to create the the IRepository
 void setInputStream(java.io.InputStream inputStream)
          Sets the InputStream that should be used to create the IRepository
 
Methods inherited from class com.jrockit.mc.flightrecorder.spi.Provider
getFilter, getProgressMonitor, setFilter, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamProvider

public StreamProvider()
Method Detail

setInputStream

public final void setInputStream(java.io.InputStream inputStream)
Sets the InputStream that should be used to create the IRepository

Parameters:
inputStream - the inputStream

getInputStream

public final java.io.InputStream getInputStream()
Returns the InputStream used to create the the IRepository

Returns:
the file

createRepository

public final IRepository createRepository()
Description copied from class: Provider
Create the IRepository for the provider.

Specified by:
createRepository in class Provider
Returns:
teh provider or null if the provider could no be constrctued.

createRepositoryFromStream

public abstract IRepository createRepositoryFromStream(java.io.InputStream inputStream)
                                                throws java.io.IOException
Create an IRepository from an InputStream

Parameters:
inputStream - the inputStream to create the repository from
Returns:
a repository
Throws:
java.io.IOException - if there were problem creating the repository from the stream.


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.