code:     public void testRead7ZipMultiVolumeArchiveForStream() throws IOException {
  
          final FileInputStream archive =
              new FileInputStream(getFile("apache-maven-2.2.1.zip.001"));
          ZipArchiveInputStream zi = null;
          try {
              zi = new ZipArchiveInputStream(archive,null,false);
  
              // these are the entries that are supposed to be processed
              // correctly without any problems
              for (final String element : ENTRIES) {
                  assertEquals(element, zi.getNextEntry().getName());
              }
  
              // this is the last entry that is truncated
              final ArchiveEntry lastEntry = zi.getNextEntry();
              assertEquals(LAST_ENTRY_NAME, lastEntry.getName());
              final byte [] buffer = new byte [4096];
  
              // before the fix, we'd get 0 bytes on this read and all
              // subsequent reads thus a client application might enter
              // an infinite loop after the fix, we should get an
              // exception
              try {
                  while (zi.read(buffer) > 0) { }
                  fail("shouldn't be able to read from truncated entry");
              } catch (final IOException e) {
                  assertEquals("Truncated ZIP file", e.getMessage());
              }
  
              // and now we get another entry, which should also yield
              // an exception
              try {
                  zi.getNextEntry();
                  fail("shouldn't be able to read another entry from truncated"
                       + " file");
              } catch (final IOException e) {
                  // this is to be expected
              }
          } finally {
              if (zi != null) {
                  zi.close();
              }
          }
      }
  
      @Test(expected=IOException.class)
  