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

org.fcrepo.utilities.io.NullInputStream Maven / Gradle / Ivy

There is a newer version: 6.5.0
Show newest version
/* The contents of this file are subject to the license and copyright terms
 * detailed in the license directory at the root of the source tree (also
 * available online at http://fedora-commons.org/license/).
 */
package org.fcrepo.utilities.io;

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

    /**
     * CXF needs a non-null entity to preserve content-type and content-length
     * as per 2.7.7
     * @author [email protected]
     *
     */
public class NullInputStream extends InputStream {

    public static final NullInputStream NULL_STREAM =
            new NullInputStream();
    
    @Override
    public int read() throws IOException {
        return -1;
    }
    
    @Override
    public long skip(long n) {
        return n;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy