us.zuercher.gpx2map.image.netpbm
Class NetpbmImageFactory.GzipRetryLogic

java.lang.Object
  extended by us.zuercher.gpx2map.image.netpbm.NetpbmImageFactory.GzipRetryLogic
Enclosing class:
NetpbmImageFactory

private class NetpbmImageFactory.GzipRetryLogic
extends Object

GzipRetryLogic encapsulates the logic of reading Netpbm files that may or may not be gzipped.


Field Summary
private  File imageFile
           
private  URL imageUrl
           
 
Constructor Summary
NetpbmImageFactory.GzipRetryLogic(File imageFile)
           
NetpbmImageFactory.GzipRetryLogic(URL imageUrl)
           
 
Method Summary
(package private)  Object execute(NetpbmImageFactory.GzipRetryLogicTarget target)
           
(package private)  String getFileName()
           
private  boolean guessGzip()
           
private  BufferedInputStream makeInputStream(boolean useGzip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageFile

private final File imageFile

imageUrl

private final URL imageUrl
Constructor Detail

NetpbmImageFactory.GzipRetryLogic

NetpbmImageFactory.GzipRetryLogic(File imageFile)

NetpbmImageFactory.GzipRetryLogic

NetpbmImageFactory.GzipRetryLogic(URL imageUrl)
Method Detail

getFileName

String getFileName()

guessGzip

private boolean guessGzip()

makeInputStream

private BufferedInputStream makeInputStream(boolean useGzip)
                                     throws IOException
Throws:
IOException

execute

Object execute(NetpbmImageFactory.GzipRetryLogicTarget target)
         throws IOException
Throws:
IOException