From 9c3b8da7e7fa0e365aa3d6b057c6f51ca298a9f1 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Tue, 17 Nov 2009 11:17:45 +0000 Subject: [PATCH] minor cleanup git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@413 f203690c-595d-4dc9-a70b-905162fa7fd2 --- .../com/healthmarketscience/jackcess/Column.java | 13 +++++++++++-- 1 file 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 { /** * 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 { @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(); } } -- 2.39.5