net.i2p.util
Class PartialEepGet

java.lang.Object
  extended by net.i2p.util.EepGet
      extended by net.i2p.util.PartialEepGet

public class PartialEepGet
extends EepGet

Fetch exactly the first 'size' bytes into a stream Anything less or more will throw an IOException No retries, no min and max size options, no timeout option Useful for checking .sud versions

Since:
0.7.12
Author:
zzz

Nested Class Summary
 
Nested classes/interfaces inherited from class net.i2p.util.EepGet
EepGet.CLIStatusListener, EepGet.StatusListener
 
Field Summary
(package private)  long _fetchSize
           
 
Fields inherited from class net.i2p.util.EepGet
_aborted, _actualURL, _alreadyTransferred, _bytesRemaining, _bytesTransferred, _context, _currentAttempt, _encodingChunked, _fetchInactivityTimeout, _headersRead, _keepFetching, _listeners, _log, _notModified, _numRetries, _out, _outputFile, _outputStream, _proxy, _proxyIn, _proxyOut, _redirectLocation, _redirects, _shouldProxy, _transferFailed, _url, CONNECT_TIMEOUT, INACTIVITY_TIMEOUT, MAX_COMPLETE_FAILS, USER_AGENT
 
Constructor Summary
PartialEepGet(I2PAppContext ctx, java.lang.String proxyHost, int proxyPort, java.io.OutputStream outputStream, java.lang.String url, long size)
           
 
Method Summary
protected  java.lang.String getRequest()
           
static void main(java.lang.String[] args)
          PartialEepGet [-p 127.0.0.1:4444] [-l #bytes] url
 
Methods inherited from class net.i2p.util.EepGet
addStatusListener, doFetch, fetch, fetch, fetch, getContentType, getETag, getLastModified, getNotModified, readChunkLength, readHeaders, sendRequest, stopFetching, suggestName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_fetchSize

long _fetchSize
Constructor Detail

PartialEepGet

public PartialEepGet(I2PAppContext ctx,
                     java.lang.String proxyHost,
                     int proxyPort,
                     java.io.OutputStream outputStream,
                     java.lang.String url,
                     long size)
Parameters:
size - fetch exactly this many bytes
Method Detail

main

public static void main(java.lang.String[] args)
PartialEepGet [-p 127.0.0.1:4444] [-l #bytes] url


getRequest

protected java.lang.String getRequest()
                               throws java.io.IOException
Overrides:
getRequest in class EepGet
Throws:
java.io.IOException