org.semanticdesktop.aperture.subcrawler.bzip2
Class BZip2SubCrawler

java.lang.Object
  extended by org.semanticdesktop.aperture.subcrawler.base.AbstractSubCrawler
      extended by org.semanticdesktop.aperture.subcrawler.base.AbstractCompressorSubCrawler
          extended by org.semanticdesktop.aperture.subcrawler.bzip2.BZip2SubCrawler
All Implemented Interfaces:
SubCrawler

public class BZip2SubCrawler
extends AbstractCompressorSubCrawler

A SubCrawler Implementation working with BZIP2 archives.


Constructor Summary
BZip2SubCrawler()
           
 
Method Summary
protected  URI getContentUri(URI archiveUri)
          Returns the uri of the content file, this method is supposed to strip the compressor-specific suffix (like .gz or .bz2).
protected  InputStream getUncompressedStream(InputStream stream)
          Returns a stream that uncompresses the data
 String getUriPrefix()
          Returns the prefix used when generating uris.
 
Methods inherited from class org.semanticdesktop.aperture.subcrawler.base.AbstractCompressorSubCrawler
stopSubCrawler, subCrawl
 
Methods inherited from class org.semanticdesktop.aperture.subcrawler.base.AbstractSubCrawler
createChildUri, getDataObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BZip2SubCrawler

public BZip2SubCrawler()
Method Detail

getUncompressedStream

protected InputStream getUncompressedStream(InputStream stream)
                                     throws IOException
Description copied from class: AbstractCompressorSubCrawler
Returns a stream that uncompresses the data

Specified by:
getUncompressedStream in class AbstractCompressorSubCrawler
Parameters:
stream - InputStream with the compressed data
Returns:
stream with the uncompressed data
Throws:
IOException

getUriPrefix

public String getUriPrefix()
Description copied from class: AbstractSubCrawler
Returns the prefix used when generating uris. See the documentation for SubCrawler class for more details.

Specified by:
getUriPrefix in class AbstractSubCrawler
Returns:
the prefix used when generating uris.

getContentUri

protected URI getContentUri(URI archiveUri)
Description copied from class: AbstractCompressorSubCrawler
Returns the uri of the content file, this method is supposed to strip the compressor-specific suffix (like .gz or .bz2). It is meant to be overridden by the concrete compressor subcrawler subclasses.

Overrides:
getContentUri in class AbstractCompressorSubCrawler
Parameters:
archiveUri - the uri of the archive
Returns:
the uri of the compressed file content


Copyright © 2010 Aperture Development Team. All Rights Reserved.