@Test public void testReadBoolean() throws IOException { bytes = new byte[] { 0x00, 0x01, 0x02, }; final ByteArrayInputStream bais = new ByteArrayInputStream( bytes ); final SwappedDataInputStream sdis = new SwappedDataInputStream( bais ); assertEquals( false, sdis.readBoolean() ); assertEquals( true, sdis.readBoolean() ); assertEquals( true, sdis.readBoolean() ); sdis.close(); }