equal
deleted
inserted
replaced
103 * and then read the expected data for the entry |
103 * and then read the expected data for the entry |
104 * |
104 * |
105 * @throws Exception If an error occurs during the test |
105 * @throws Exception If an error occurs during the test |
106 */ |
106 */ |
107 @Test |
107 @Test |
108 private void testStoredSkip() throws Exception { |
108 public void testStoredSkip() throws Exception { |
109 |
109 |
110 try (ZipFile zf = new ZipFile(STORED_ZIPFILE.toFile())) { |
110 try (ZipFile zf = new ZipFile(STORED_ZIPFILE.toFile())) { |
111 var entries = zf.entries(); |
111 var entries = zf.entries(); |
112 while (entries.hasMoreElements()) { |
112 while (entries.hasMoreElements()) { |
113 var entry = entries.nextElement(); |
113 var entry = entries.nextElement(); |
151 * and then read the expected data for the entry |
151 * and then read the expected data for the entry |
152 * |
152 * |
153 * @throws Exception If an error occurs during the test |
153 * @throws Exception If an error occurs during the test |
154 */ |
154 */ |
155 @Test |
155 @Test |
156 private void testStoredNegativeSkip() throws Exception { |
156 public void testStoredNegativeSkip() throws Exception { |
157 |
157 |
158 try (ZipFile zf = new ZipFile(STORED_ZIPFILE.toFile())) { |
158 try (ZipFile zf = new ZipFile(STORED_ZIPFILE.toFile())) { |
159 var entries = zf.entries(); |
159 var entries = zf.entries(); |
160 while (entries.hasMoreElements()) { |
160 while (entries.hasMoreElements()) { |
161 var entry = entries.nextElement(); |
161 var entry = entries.nextElement(); |
196 * and then read the expected data for the entry |
196 * and then read the expected data for the entry |
197 * |
197 * |
198 * @throws Exception If an error occurs during the test |
198 * @throws Exception If an error occurs during the test |
199 */ |
199 */ |
200 @Test |
200 @Test |
201 private void testDeflatedSkip() throws Exception { |
201 public void testDeflatedSkip() throws Exception { |
202 try (ZipFile zf = new ZipFile(DEFLATED_ZIPFILE.toFile())) { |
202 try (ZipFile zf = new ZipFile(DEFLATED_ZIPFILE.toFile())) { |
203 var toSkip = 5; // Bytes to Skip |
203 var toSkip = 5; // Bytes to Skip |
204 var entries = zf.entries(); |
204 var entries = zf.entries(); |
205 while (entries.hasMoreElements()) { |
205 while (entries.hasMoreElements()) { |
206 var entry = entries.nextElement(); |
206 var entry = entries.nextElement(); |
223 * a negative skip value for a DEFLATED entry. |
223 * a negative skip value for a DEFLATED entry. |
224 * |
224 * |
225 * @throws Exception If an unexpected error occurs during the test |
225 * @throws Exception If an unexpected error occurs during the test |
226 */ |
226 */ |
227 @Test |
227 @Test |
228 private void testDeflatedIOException() throws Exception { |
228 public void testDeflatedIOException() throws Exception { |
229 try (ZipFile zf = new ZipFile(DEFLATED_ZIPFILE.toFile())) { |
229 try (ZipFile zf = new ZipFile(DEFLATED_ZIPFILE.toFile())) { |
230 var entries = zf.entries(); |
230 var entries = zf.entries(); |
231 while (entries.hasMoreElements()) { |
231 while (entries.hasMoreElements()) { |
232 var entry = entries.nextElement(); |
232 var entry = entries.nextElement(); |
233 assertNotNull(entry); |
233 assertNotNull(entry); |