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

org.jboss.resteasy.reactive.common.util.StreamUtil Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package org.jboss.resteasy.reactive.common.util;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

public final class StreamUtil {

    private StreamUtil() {
    }

    public static boolean isEmpty(InputStream stream) {
        if (stream instanceof ByteArrayInputStream) {
            return (((ByteArrayInputStream) stream).available() == 0);
        }
        return stream instanceof EmptyInputStream;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy