### Question:
IOUtils { public static boolean isEmpty(InputStream is) throws IOException { if (is == null) { return true; } if (is.available() > 0) { return false; } final byte[] bytes = new byte[1]; if (is.markSupported()) { is.mark(1); try { return isEof(is.read(bytes)); } finally { is.reset(); } } if (!(is instanceof PushbackInputStream)) { return false; } PushbackInputStream pbStream = (PushbackInputStream)is; boolean isEmpty = isEof(pbStream.read(bytes)); if (!isEmpty) { pbStream.unread(bytes); } return isEmpty; } private  IOUtils(); static boolean isEmpty(InputStream is); static String newStringFromBytes(byte[] bytes, String charsetName); static String newStringFromBytes(byte[] bytes); static String newStringFromBytes(byte[] bytes, String charsetName, int start, int length); static String newStringFromBytes(byte[] bytes, int start, int length); static int copy(final InputStream input, final OutputStream output); static int copyAndCloseInput(final InputStream input,
            final OutputStream output); static int copyAndCloseInput(final InputStream input,
            final OutputStream output, int bufferSize); static void copyAndCloseInput(final Reader input,
                                        final Writer output); static void copyAndCloseInput(final Reader input,
            final Writer output, int bufferSize); static int copy(final InputStream input, final OutputStream output,
            int bufferSize); static void copyAtLeast(final InputStream input,
                               final OutputStream output,
                               int atLeast); static void copyAtLeast(final Reader input,
                                   final Writer output,
                                   int atLeast); static void copy(final Reader input, final Writer output,
            final int bufferSize); static void transferTo(InputStream inputStream, File destinationFile); static String toString(final InputStream input); static String toString(final InputStream input, String charset); static String toString(final InputStream input, int bufferSize); static String toString(final InputStream input, int bufferSize, String charset); static String toString(final Reader input); static String toString(final Reader input, int bufSize); static String readStringFromStream(InputStream in); static ByteArrayInputStream loadIntoBAIS(InputStream in); static void consume(InputStream in); static void consume(final InputStream input,
                               int atLeast); static byte[] readBytesFromStream(InputStream in); static final Charset UTF8_CHARSET; static final int DEFAULT_BUFFER_SIZE; }### Answer:
@Test public void testIsEmpty() throws Exception { assertTrue(IOUtils.isEmpty(new ByteArrayInputStream(new byte[]{}))); }