All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.httpcache4j.util.AvailableInputStream Maven / Gradle / Ivy

The newest version!
package org.codehaus.httpcache4j.util;

import java.io.IOException;
import java.io.InputStream;

import org.codehaus.httpcache4j.payload.DelegatingInputStream;

/**
* @author Erlend Hamnaberg
*/
public final class AvailableInputStream extends DelegatingInputStream {
    private boolean available = true;

    public AvailableInputStream(InputStream delegate) {
        super(delegate);
    }

    public boolean isAvailable() {
        return available;
    }

    @Override
    public void close() throws IOException {
        available = false;
        super.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy