forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.multisess' (head 655a0c2bbd50625c804b8de8c809b40ed63f53f4)
to branch 'i2p.i2p' (head b977ab50209475c0e74825f361924e05dbd470c7)
This commit is contained in:
@ -121,6 +121,112 @@ public interface UpdateManager {
|
||||
* @return true if valid, false if corrupt
|
||||
*/
|
||||
public boolean notifyComplete(UpdateTask task, String actualVersion, File file);
|
||||
|
||||
/**
|
||||
* Is an update available?
|
||||
* Blocking.
|
||||
* An available update may still have a constraint or lack sources.
|
||||
* @param type the UpdateType of this request
|
||||
* @return new version or null if nothing newer is available
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public String checkAvailable(UpdateType type);
|
||||
|
||||
/**
|
||||
* Is an update available?
|
||||
* Blocking.
|
||||
* An available update may still have a constraint or lack sources.
|
||||
* @param type the UpdateType of this request
|
||||
* @param maxWait max time to block
|
||||
* @return new version or null if nothing newer is available
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public String checkAvailable(UpdateType type, long maxWait);
|
||||
|
||||
/**
|
||||
* Is an update available?
|
||||
* Blocking.
|
||||
* An available update may still have a constraint or lack sources.
|
||||
* @param type the UpdateType of this request
|
||||
* @param maxWait max time to block
|
||||
* @param id id of this request
|
||||
* @return new version or null if nothing newer is available
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public String checkAvailable(UpdateType type, String id, long maxWait);
|
||||
|
||||
/**
|
||||
* Is a router update being downloaded?
|
||||
* @return true iff router update is being downloaded
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean isUpdateInProgress();
|
||||
|
||||
/**
|
||||
* Is a router update being downloaded?
|
||||
* @param type the UpdateType of this request
|
||||
* @return true iff router update is being downloaded
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean isUpdateInProgress(UpdateType type);
|
||||
|
||||
/**
|
||||
* Is a router update being downloaded?
|
||||
* @param type the UpdateType of this request
|
||||
* @param id of this request
|
||||
* @return true iff router update is being downloaded
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean isUpdateInProgress(UpdateType type, String id);
|
||||
/**
|
||||
* Non-blocking. Does not check.
|
||||
* Fails if check or update already in progress.
|
||||
* If returns true, then call isUpdateInProgress() in a loop
|
||||
* @param type the UpdateType of this request
|
||||
* @return true if task started
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean update(UpdateType type);
|
||||
|
||||
/**
|
||||
* Non-blocking. Does not check.
|
||||
* Fails if check or update already in progress.
|
||||
* If returns true, then call isUpdateInProgress() in a loop
|
||||
* @param type the UpdateType of this request
|
||||
* @param id id of this request
|
||||
* @return true if task started
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean update(UpdateType type, String id);
|
||||
|
||||
/**
|
||||
* Non-blocking. Does not check.
|
||||
* Fails if check or update already in progress.
|
||||
* If returns true, then call isUpdateInProgress() in a loop
|
||||
* @param type the UpdateType of this request
|
||||
* @param maxTime not honored by all Updaters
|
||||
* @return true if task started
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean update(UpdateType type, long maxTime);
|
||||
|
||||
/**
|
||||
* Non-blocking. Does not check.
|
||||
* Fails if check or update already in progress.
|
||||
* If returns true, then call isUpdateInProgress() in a loop
|
||||
* @param type the UpdateType of this request
|
||||
* @param maxTime not honored by all Updaters
|
||||
* @param id id of this request
|
||||
* @return true if task started
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public boolean update(UpdateType type, String id, long maxTime);
|
||||
|
||||
/**
|
||||
* The status on any update current or last finished.
|
||||
* @return status or ""
|
||||
*/
|
||||
public String getStatus();
|
||||
|
||||
/**
|
||||
* For debugging
|
||||
|
@ -110,7 +110,7 @@ public class ResettableGZIPInputStream extends InflaterInputStream {
|
||||
//if (_lookaheadStream.getEOFReached()) {
|
||||
if (inf.finished()) {
|
||||
verifyFooter();
|
||||
inf.reset(); // so it doesn't bitch about missing data...
|
||||
inf.reset(); // so it doesn't complain about missing data...
|
||||
_complete = true;
|
||||
}
|
||||
return read;
|
||||
|
Reference in New Issue
Block a user