From: Wolfgang M. M. <wol...@us...> - 2004-04-14 12:18:03
|
Update of /cvsroot/exist/eXist-1.0/src/org/dbxml/core/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20167/src/org/dbxml/core/data Modified Files: Value.java Removed Files: Key.java Log Message: Improved page organization in dom.dbx to fix known XUpdate issues. --- Key.java DELETED --- Index: Value.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/dbxml/core/data/Value.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Value.java 5 Apr 2004 11:19:29 -0000 1.5 --- Value.java 14 Apr 2004 12:17:22 -0000 1.6 *************** *** 116,129 **** return data; } - - public Value trim() { - if(pos > 0 || len < data.length) { - System.out.println("trimming value"); - final byte[] b = new byte[len]; - System.arraycopy(data, pos, b, 0, len); - return new Value(b); - } - return this; - } public final byte[] data() { --- 116,119 ---- *************** *** 134,146 **** return pos; } - - public final int length() { - return len; - } - public final byte get(int offset) { - return data[pos + offset]; - } - /** * getLength retrieves the length of the data being stored by the Value. --- 124,128 ---- *************** *** 152,187 **** } - /** - * getInputStream returns an InputStream for the Value. - * - * @return An InputStream - */ - public final InputStream getInputStream() { - return new ByteArrayInputStream(data, pos, len); - } - - /** - * streamTo streams the content of the Value to an OutputStream. - * - * @param out the OutputStream - */ - public void streamTo(OutputStream out) throws IOException { - out.write(data, pos, len); - } - - public final void streamTo(OutputStream out, int offset) - throws IOException { - out.write(data, pos + offset, len - offset); - } - - public final void streamTo(OutputStream out, int offset, int length) - throws IOException { - out.write(data, pos + offset, length); - } - - public final void copyTo(byte[] tdata, int tpos) { - System.arraycopy(data, pos, tdata, tpos, len); - } - public String toString() { return new String(getData()); --- 134,137 ---- *************** *** 206,211 **** public final int compareTo(Value value) { - // System.out.println(toString() + "(" + len + ") = " + - // value.toString() + "(" + value.len + ")"); final int dlen = value.len; final int stop = len > dlen ? dlen : len; --- 156,159 ---- |