Package net.i2p.util

Class PartialEepGet

java.lang.Object
net.i2p.util.EepGet
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 If the server does not return a Content-Length header of the correct size, the fetch will fail. Useful for checking .sud versions
Since:
0.7.12
Author:
zzz
  • Constructor Details

    • PartialEepGet

      public PartialEepGet(I2PAppContext ctx, String proxyHost, int proxyPort, OutputStream outputStream, String url, long size)
      Instantiate an EepGet that will fetch exactly size bytes when fetch() is called.
      Parameters:
      proxyHost - use null or "" for no proxy
      proxyPort - use 0 for no proxy
      size - fetch exactly this many bytes
  • Method Details