incorrect update approach (attempt prior to hashCode fix in castor-1.1(v))
authorjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 24 Apr 2007 16:07:59 +0000 (16:07 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 24 Apr 2007 16:07:59 +0000 (16:07 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@380 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/utils/ChecksummedReader.java [deleted file]

diff --git a/src/uk/ac/vamsas/client/utils/ChecksummedReader.java b/src/uk/ac/vamsas/client/utils/ChecksummedReader.java
deleted file mode 100644 (file)
index 9861e1d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/**\r
- * \r
- */\r
-package uk.ac.vamsas.client.utils;\r
-\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-\r
-/**\r
- * @author JimP\r
- * Simple wrapper for reader to keep track of position in stream.\r
- * This is used in the document unmarshalling mechanism to compute\r
- * a simple hash based on the distance between the read blocks containing\r
- * the start and end tags of the XML.\r
- */\r
-public class ChecksummedReader extends Reader {\r
-  private Reader myReader=null;\r
-  private long count=0;\r
-  public ChecksummedReader(Reader myReader) {\r
-    super();\r
-    this.myReader = myReader;\r
-    count=0;\r
-  }\r
-\r
-  /* (non-Javadoc)\r
-   * @see java.io.Reader#close()\r
-   */\r
-  public void close() throws IOException {\r
-    if (myReader!=null)\r
-      myReader.close();\r
-    else\r
-      throw new IOException("Close called on un-inited ChecksummedReader");\r
-  }\r
-\r
-  /* (non-Javadoc)\r
-   * @see java.io.Reader#read(char[], int, int)\r
-   */\r
-  public int read(char[] cbuf, int off, int len) throws IOException {\r
-    int rlen = myReader.read(cbuf, off, len);\r
-    if (rlen>0)\r
-      count+=cbuf.hashCode();\r
-    return rlen;\r
-  }\r
-  /**\r
-   * Return current checksum of read bytes.\r
-   * @return stream checksum\r
-   */\r
-  public long getChecksum() {\r
-    return count;\r
-  }\r
-  /**\r
-   * Return existing checksum value and reset\r
-   * @return old count\r
-   */\r
-  public long getAndResetChecksum() {\r
-    long cnt=count;\r
-    count=0;\r
-    return cnt;\r
-  }\r
-}\r