Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

Added skipCompressedByteArray() to WritableUtils.java

John Xing4229c5b33d04
diff --git a/CHANGES.txt b/CHANGES.txt
index af63d7b5a..9c4c471fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -43,6 +43,9 @@ Release 0.7
Slightly modified are web.xml and cached.jsp.
(John Xing, 20050401)
+ 8. Add skipCompressedByteArray() to WritableUtils.java.
+ (John Xing, 20050402)
+
Release 0.6
1. Added clustering-carrot2 plugin, together with introduction of clustering
diff --git a/src/java/org/apache/nutch/io/WritableUtils.java b/src/java/org/apache/nutch/io/WritableUtils.java
index a0b2b494a..5c56ae65c 100644
--- a/src/java/org/apache/nutch/io/WritableUtils.java
+++ b/src/java/org/apache/nutch/io/WritableUtils.java
@@ -40,6 +40,11 @@ public final class WritableUtils {
return decompressed;
}
+ public static void skipCompressedByteArray(DataInput in) throws IOException {
+ int length = in.readInt();
+ in.skipBytes(length);
+ }
+
public static int writeCompressedByteArray(DataOutput out, byte[] bytes) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
GZIPOutputStream gzout = new GZIPOutputStream(bos);