protected void retrieveOneBulletin(File destFile, UniversalId uid) throws Exception { FileOutputStream out = new FileOutputStream(destFile); int chunkSize = MIRRORING_MAX_CHUNK_SIZE; ProgressMeterInterface nullProgressMeter = null; int totalLength = BulletinZipUtilities.retrieveBulletinZipToStream( uid, out, chunkSize, gateway, getSecurity(), nullProgressMeter); out.close(); if (destFile.length() != totalLength) { logError("file=" + destFile.length() + ", returned=" + totalLength); throw new ServerErrorException("totalSize didn't match data length"); } }