NASA World Wind

gov.nasa.worldwind.layers
Class BasicTiledImageLayer.DownloadPostProcessor

java.lang.Object
  extended by gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
      extended by gov.nasa.worldwind.layers.BasicTiledImageLayer.DownloadPostProcessor
All Implemented Interfaces:
RetrievalPostProcessor
Direct Known Subclasses:
BasicTiledImageLayerBulkDownloader.BulkDownloadPostProcessor
Enclosing class:
BasicTiledImageLayer

protected static class BasicTiledImageLayer.DownloadPostProcessor
extends AbstractRetrievalPostProcessor


Field Summary
protected  FileStore fileStore
           
protected  BasicTiledImageLayer layer
           
protected  TextureTile tile
           
 
Fields inherited from class gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
avList, retriever
 
Constructor Summary
BasicTiledImageLayer.DownloadPostProcessor(TextureTile tile, BasicTiledImageLayer layer)
           
BasicTiledImageLayer.DownloadPostProcessor(TextureTile tile, BasicTiledImageLayer layer, FileStore fileStore)
           
 
Method Summary
protected  File doGetOutputFile()
          Abstract method that subclasses must provide to identify the output file for the post-processor's retrieval content.
protected  Object getFileLock()
          Returns an object that can be used to synchronize writing to the output file.
protected  FileStore getFileStore()
           
protected  ByteBuffer handleSuccessfulRetrieval()
          Process the retrieved data if it has been retrieved successfully.
protected  ByteBuffer handleTextContent()
          Handles Text content.
protected  void markResourceAbsent()
          Marks the retrieval target absent.
 
Methods inherited from class gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
convertToDDS, getOutputFile, getRetriever, handleApplicationContent, handleContent, handleContentException, handleHTMLContent, handleImageContent, handleInvalidResponseCode, handleUnknownContentType, handleUnsuccessfulRetrieval, handleWMSExceptionContent, handleXMLContent, handleZipContent, isDeleteOnExit, isPrimaryContentType, isWMSException, logTextBuffer, overwriteExistingFile, run, saveBuffer, saveBuffer, saveDDS, transformPixels, validateHTTPResponseCode, validateJarResponseCode, validateResponseCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileStore

protected final FileStore fileStore

layer

protected final BasicTiledImageLayer layer

tile

protected final TextureTile tile
Constructor Detail

BasicTiledImageLayer.DownloadPostProcessor

public BasicTiledImageLayer.DownloadPostProcessor(TextureTile tile,
                                                  BasicTiledImageLayer layer)

BasicTiledImageLayer.DownloadPostProcessor

public BasicTiledImageLayer.DownloadPostProcessor(TextureTile tile,
                                                  BasicTiledImageLayer layer,
                                                  FileStore fileStore)
Method Detail

doGetOutputFile

protected File doGetOutputFile()
Description copied from class: AbstractRetrievalPostProcessor
Abstract method that subclasses must provide to identify the output file for the post-processor's retrieval content.

Specified by:
doGetOutputFile in class AbstractRetrievalPostProcessor
Returns:
the output file.

getFileLock

protected Object getFileLock()
Description copied from class: AbstractRetrievalPostProcessor
Returns an object that can be used to synchronize writing to the output file. Superclasses should override this method and return the object used as a lock by other objects that read or otherwise interact with the output file.

Overrides:
getFileLock in class AbstractRetrievalPostProcessor
Returns:
an object to use for read/write synchronization, or null if no lock is needed.

getFileStore

protected FileStore getFileStore()

handleSuccessfulRetrieval

protected ByteBuffer handleSuccessfulRetrieval()
Description copied from class: AbstractRetrievalPostProcessor
Process the retrieved data if it has been retrieved successfully.

Overrides:
handleSuccessfulRetrieval in class AbstractRetrievalPostProcessor
Returns:
a buffer containing the downloaded data, perhaps converted during content handling.

handleTextContent

protected ByteBuffer handleTextContent()
                                throws IOException
Description copied from class: AbstractRetrievalPostProcessor
Handles Text content. If the content type is text/xml, AbstractRetrievalPostProcessor.handleXMLContent() is called. If the content type is text/html, AbstractRetrievalPostProcessor.handleHTMLContent() is called. For all other sub-types the content is logged as a message with level Level.SEVERE.

Overrides:
handleTextContent in class AbstractRetrievalPostProcessor
Returns:
a buffer containing the retrieved text.
Throws:
IOException - if an IO error occurs while processing the data.

markResourceAbsent

protected void markResourceAbsent()
Description copied from class: AbstractRetrievalPostProcessor
Marks the retrieval target absent. Subclasses should override this method if they keep track of absent-resources. The default implementation does nothing.

Overrides:
markResourceAbsent in class AbstractRetrievalPostProcessor

NASA World Wind