Changeset 1134 for OAIHarvester
- Timestamp:
- 02/17/11 13:15:45 (13 years ago)
- Location:
- OAIHarvester/trunk/OAIHarvester/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/impl/Response.java
r1128 r1134 22 22 23 23 final class Response { 24 private final class CountingInputStream extends FilterInputStream {24 private static final class CountingInputStream extends FilterInputStream { 25 25 private long count = 0; 26 26 … … 69 69 private final HttpEntity entity; 70 70 private final long now = System.currentTimeMillis(); 71 private CountingInputStream stream;72 private XMLStreamReader reader;71 private final CountingInputStream stream; 72 private final XMLStreamReader reader; 73 73 74 74 Response(HarvestJobImpl job, HttpEntity entity, AbstractHarvester harvester) … … 125 125 job.addToProcessingTime(System.currentTimeMillis() - now); 126 126 job.addToBytesTransferred(stream.getByteCount()); 127 if (reader != null) { 128 try { 129 reader.close(); 130 } catch (XMLStreamException e) { 131 /* IGNORE */ 132 } 133 } 134 if (stream != null) { 135 try { 136 stream.close(); 137 } catch (IOException e) { 138 /* IGNORE */ 139 } 127 try { 128 reader.close(); 129 } catch (XMLStreamException e) { 130 /* IGNORE */ 131 } 132 try { 133 stream.close(); 134 } catch (IOException e) { 135 /* IGNORE */ 140 136 } 141 137 try { -
OAIHarvester/trunk/OAIHarvester/src/test/java/eu/clarin/cmdi/oai/harvester/HarvesterTest.java
r1128 r1134 27 27 XMLOutputFactory.newInstance(); 28 28 29 private class MyHarvestHandler extends HarvestHandlerAdapter {29 private static class MyHarvestHandler extends HarvestHandlerAdapter { 30 30 private ZipOutputStream output; 31 31 private int reqNum;
Note: See TracChangeset
for help on using the changeset viewer.