private void createLocalFile(Pointer p, File file) throws Exception { OutputStream out = null; try { out = new FileOutputStream(file, false); for (Address address : p.getAddresses()) { byte[] content = get(address); out.write(content); out.flush(); } } finally { out.close(); } }
private byte[] get(Pointer p) throws Exception { Address address = p.getAddresses().get(0); return get(address); }