summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2009-11-17 11:17:45 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2009-11-17 11:17:45 +0000
commit9c3b8da7e7fa0e365aa3d6b057c6f51ca298a9f1 (patch)
treef7cc6bdc9cf63fbb6d8b85a66498130e6bbf8329
parent1d62cd563e34ef794db7acc6f0dc4a789f80d0a2 (diff)
downloadjackcess-9c3b8da7e7fa0e365aa3d6b057c6f51ca298a9f1.tar.gz
jackcess-9c3b8da7e7fa0e365aa3d6b057c6f51ca298a9f1.zip
minor cleanup
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@413 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/Column.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java
index 85ebde0..43684c7 100644
--- a/src/java/com/healthmarketscience/jackcess/Column.java
+++ b/src/java/com/healthmarketscience/jackcess/Column.java
@@ -29,6 +29,7 @@ package com.healthmarketscience.jackcess;
import java.io.IOException;
import java.io.ObjectStreamException;
+import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.ByteBuffer;
@@ -1514,8 +1515,10 @@ public class Column implements Comparable<Column> {
/**
* Wrapper for raw column data which can be re-written.
*/
- private static class RawData
+ private static class RawData implements Serializable
{
+ private static final long serialVersionUID = 0L;
+
private final byte[] _bytes;
private RawData(byte[] bytes) {
@@ -1528,7 +1531,13 @@ public class Column implements Comparable<Column> {
@Override
public String toString() {
- return "RawData: " + ByteUtil.toHexString(_bytes);
+ return "RawData: " + ByteUtil.toHexString(getBytes());
+ }
+
+ private Object writeReplace() throws ObjectStreamException {
+ // if we are going to serialize this, convert it back to a normal
+ // byte[] (in case it is restored outside of the context of jackcess)
+ return getBytes();
}
}