public ProcessArchive(ZipInputStream zipInputStream) throws IOException { for (ZipEntry zipEntry = zipInputStream.getNextEntry(); zipEntry != null; zipEntry = zipInputStream.getNextEntry()) { String entryName = zipEntry.getName(); byte[] bytes = IoUtil.readBytes(zipInputStream); entries.put(entryName, bytes); } }
public ProcessArchive(ZipInputStream zipInputStream) throws IOException { for (ZipEntry zipEntry = zipInputStream.getNextEntry(); zipEntry != null; zipEntry = zipInputStream.getNextEntry()) { String entryName = zipEntry.getName(); byte[] bytes = IoUtil.readBytes(zipInputStream); entries.put(entryName, bytes); } }
private void storeFileInDb(String name, InputStream is) throws IOException { if (processFiles == null) { processFiles = new HashMap(); } log.trace("preparing '" + name + "' for storage in the database"); processFiles.put(name, new ByteArray(name, IoUtil.readBytes(is))); }
private void storeFileInDb(String name, InputStream is) throws IOException { if (processFiles == null) { processFiles = new HashMap(); } log.trace("preparing '" + name + "' for storage in the database"); processFiles.put(name, new ByteArray(name, IoUtil.readBytes(is))); }
private byte[] getBytesFromFileSystem(String name) { InputStream in = getInputStreamFromFileSystem(name); if (in == null) return null; try { return IoUtil.readBytes(in); } catch (IOException e) { return null; } finally { try { in.close(); } catch (IOException e) { // disregard exception on close } } }
private byte[] getBytesFromFileSystem(String name) { InputStream in = getInputStreamFromFileSystem(name); if (in == null) return null; try { return IoUtil.readBytes(in); } catch (IOException e) { return null; } finally { try { in.close(); } catch (IOException e) { // disregard exception on close } } }