Revision: 2108 http://archive-access.svn.sourceforge.net/archive-access/?rev=2108&view=rev Author: bradtofel Date: 2007-12-11 18:12:48 -0800 (Tue, 11 Dec 2007) Log Message: ----------- TWEAK: command + variable name changes Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/Http11ResourceStore.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/Http11ResourceStore.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/Http11ResourceStore.java 2007-12-11 22:31:26 UTC (rev 2107) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/Http11ResourceStore.java 2007-12-12 02:12:48 UTC (rev 2108) @@ -35,10 +35,10 @@ /** - * Implements ResourceStore where ARCs are accessed via HTTP 1.1 range requests. - * All ARC files are assumed to be "rooted" at a particular HTTP URL, within - * a single directory, implying an ARC file reverse-proxy to connect through - * to actual HTTP ARC locations. + * Implements ResourceStore where ARC/WARCs are accessed via HTTP 1.1 range + * requests. All files are assumed to be "rooted" at a particular HTTP URL, + * within a single directory, implying a file reverse-proxy to connect through + * to actual HTTP ARC/WARC locations. * * @author brad * @version $Date$, $Revision$ @@ -51,24 +51,24 @@ public Resource retrieveResource(SearchResult result) throws IOException, ResourceNotAvailableException { - // extract ARC filename + add .arc.gz if it is not present - String arcName = result.get(WaybackConstants.RESULT_ARC_FILE); - if(arcName == null || arcName.length() < 1) { + // extract ARC filename + String fileName = result.get(WaybackConstants.RESULT_ARC_FILE); + if(fileName == null || fileName.length() < 1) { throw new IOException("No ARC/WARC name in search result..."); } - // extract ARC offset + convert to long + // extract offset + convert to long final String offsetString = result.get(WaybackConstants.RESULT_OFFSET); if(offsetString == null || offsetString.length() < 1) { throw new IOException("No ARC/WARC offset in search result..."); } final long offset = Long.parseLong(offsetString); - String arcUrl = urlPrefix + arcName; + String fileUrl = urlPrefix + fileName; Resource r = null; try { - r = ResourceFactory.getResource(new URL(arcUrl), offset); + r = ResourceFactory.getResource(new URL(fileUrl), offset); } catch (IOException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |