public CachedRowSet createCopy() throws SQLException {
        ObjectOutputStream out;
        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
        try {
            out = new ObjectOutputStream(bOut);
            out.writeObject(this);
        } catch (IOException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        }

        ObjectInputStream in;

        try {
            ByteArrayInputStream bIn = new ByteArrayInputStream(bOut.toByteArray());
            in = new ObjectInputStream(bIn);
        } catch (StreamCorruptedException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        } catch (IOException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        }

        try {
            //return ((CachedRowSet)(in.readObject()));
            CachedRowSetImpl crsTemp = (CachedRowSetImpl)in.readObject();
            crsTemp.resBundle = this.resBundle;
            return ((CachedRowSet)crsTemp);

        } catch (ClassNotFoundException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        } catch (OptionalDataException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        } catch (IOException ex) {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.clonefail").toString() , ex.getMessage()));
        }
    }
Creates a <code>RowSet</code> object that is a deep copy of
this <code>CachedRowSetImpl</code> object's data, including
constraints.  Updates made
on a copy are not visible to the original rowset;
a copy of a rowset is completely independent from the original.
<P>
Making a copy saves the cost of creating an identical rowset
from first principles, which can be quite expensive.
For example, it can eliminate the need to query a
remote database server.
@return a new <code>CachedRowSet</code> object that is a deep copy
          of this <code>CachedRowSet</code> object and is
          completely independent from this <code>CachedRowSetImpl</code>
          object.
@throws SQLException if an error occurs in generating the copy of this
          of the <code>CachedRowSetImpl</code>
@see #createShared
@see RowSetEvent
@see RowSetListener
src/main/java/org/replicadb/rowset/sun/rowset/CachedRowSetImpl.java