jdk/src/share/classes/javax/sql/rowset/serial/SerialArray.java
changeset 14781 701d0765f75f
parent 14409 d879c92507ec
child 18564 f9db68ff2cbb
equal deleted inserted replaced
14780:a65826af2aa4 14781:701d0765f75f
    28 import java.sql.*;
    28 import java.sql.*;
    29 import java.io.*;
    29 import java.io.*;
    30 import java.util.Map;
    30 import java.util.Map;
    31 import java.net.URL;
    31 import java.net.URL;
    32 import java.util.Arrays;
    32 import java.util.Arrays;
       
    33 
    33 
    34 
    34 /**
    35 /**
    35  * A serialized version of an <code>Array</code>
    36  * A serialized version of an <code>Array</code>
    36  * object, which is the mapping in the Java programming language of an SQL
    37  * object, which is the mapping in the Java programming language of an SQL
    37  * <code>ARRAY</code> value.
    38  * <code>ARRAY</code> value.
    39  * The <code>SerialArray</code> class provides a constructor for creating
    40  * The <code>SerialArray</code> class provides a constructor for creating
    40  * a <code>SerialArray</code> instance from an <code>Array</code> object,
    41  * a <code>SerialArray</code> instance from an <code>Array</code> object,
    41  * methods for getting the base type and the SQL name for the base type, and
    42  * methods for getting the base type and the SQL name for the base type, and
    42  * methods for copying all or part of a <code>SerialArray</code> object.
    43  * methods for copying all or part of a <code>SerialArray</code> object.
    43  * <P>
    44  * <P>
       
    45  *
    44  * Note: In order for this class to function correctly, a connection to the
    46  * Note: In order for this class to function correctly, a connection to the
    45  * data source
    47  * data source
    46  * must be available in order for the SQL <code>Array</code> object to be
    48  * must be available in order for the SQL <code>Array</code> object to be
    47  * materialized (have all of its elements brought to the client server)
    49  * materialized (have all of its elements brought to the client server)
    48  * if necessary. At this time, logical pointers to the data in the data source,
    50  * if necessary. At this time, logical pointers to the data in the data source,
    49  * such as locators, are not currently supported.
    51  * such as locators, are not currently supported.
       
    52  *
       
    53  * <h4> Thread safety </h4>
       
    54  *
       
    55  * A SerialArray is not safe for use by multiple concurrent threads.  If a
       
    56  * SerialArray is to be used by more than one thread then access to the
       
    57  * SerialArray should be controlled by appropriate synchronization.
       
    58  *
    50  */
    59  */
    51 public class SerialArray implements Array, Serializable, Cloneable {
    60 public class SerialArray implements Array, Serializable, Cloneable {
    52 
    61 
    53         /**
    62     /**
    54          * A serialized array in which each element is an <code>Object</code>
    63      * A serialized array in which each element is an <code>Object</code>
    55          * in the Java programming language that represents an element
    64      * in the Java programming language that represents an element
    56          * in the SQL <code>ARRAY</code> value.
    65      * in the SQL <code>ARRAY</code> value.
    57          * @serial
    66      * @serial
    58          */
    67      */
    59     private Object[] elements;
    68     private Object[] elements;
    60 
    69 
    61         /**
    70     /**
    62          * The SQL type of the elements in this <code>SerialArray</code> object.  The
    71      * The SQL type of the elements in this <code>SerialArray</code> object.  The
    63          * type is expressed as one of the constants from the class
    72      * type is expressed as one of the constants from the class
    64          * <code>java.sql.Types</code>.
    73      * <code>java.sql.Types</code>.
    65          * @serial
    74      * @serial
    66          */
    75      */
    67     private int baseType;
    76     private int baseType;
    68 
    77 
    69         /**
    78     /**
    70          * The type name used by the DBMS for the elements in the SQL <code>ARRAY</code>
    79      * The type name used by the DBMS for the elements in the SQL <code>ARRAY</code>
    71          * value that this <code>SerialArray</code> object represents.
    80      * value that this <code>SerialArray</code> object represents.
    72          * @serial
    81      * @serial
    73          */
    82      */
    74     private String baseTypeName;
    83     private String baseTypeName;
    75 
    84 
    76         /**
    85     /**
    77          * The number of elements in this <code>SerialArray</code> object, which
    86      * The number of elements in this <code>SerialArray</code> object, which
    78          * is also the number of elements in the SQL <code>ARRAY</code> value
    87      * is also the number of elements in the SQL <code>ARRAY</code> value
    79          * that this <code>SerialArray</code> object represents.
    88      * that this <code>SerialArray</code> object represents.
    80          * @serial
    89      * @serial
    81          */
    90      */
    82     private int len;
    91     private int len;
    83 
    92 
    84     /**
    93     /**
    85      * Constructs a new <code>SerialArray</code> object from the given
    94      * Constructs a new <code>SerialArray</code> object from the given
    86      * <code>Array</code> object, using the given type map for the custom
    95      * <code>Array</code> object, using the given type map for the custom
   190             }
   199             }
   191         }
   200         }
   192   }
   201   }
   193 
   202 
   194     /**
   203     /**
   195      * This method frees the <code>Array</code> object and releases the resources that
   204      * This method frees the {@code SeriableArray} object and releases the
   196      * it holds. The object is invalid once the <code>free</code>
   205      * resources that it holds. The object is invalid once the {@code free}
   197      * method is called.
   206      * method is called. <p> If {@code free} is called multiple times, the
   198      *<p>
   207      * subsequent calls to {@code free} are treated as a no-op. </P>
   199      * After <code>free</code> has been called, any attempt to invoke a
   208      *
   200      * method other than <code>free</code> will result in a <code>SQLException</code>
   209      * @throws SQLException if an error occurs releasing the SerialArray's resources
   201      * being thrown.  If <code>free</code> is called multiple times, the subsequent
       
   202      * calls to <code>free</code> are treated as a no-op.
       
   203      *<p>
       
   204      *
       
   205      * @throws SQLException if an error occurs releasing
       
   206      * the Array's resources
       
   207      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
       
   208      * this method
       
   209      * @since 1.6
   210      * @since 1.6
   210      */
   211      */
   211     public void free() throws SQLException {
   212     public void free() throws SQLException {
   212          throw new SQLFeatureNotSupportedException("Feature not supported");
   213         if (elements != null) {
       
   214             elements = null;
       
   215             baseTypeName= null;
       
   216         }
   213     }
   217     }
   214 
   218 
   215     /**
   219     /**
   216      * Constructs a new <code>SerialArray</code> object from the given
   220      * Constructs a new <code>SerialArray</code> object from the given
   217      * <code>Array</code> object.
   221      * <code>Array</code> object.
   290         }
   294         }
   291 
   295 
   292 
   296 
   293     }
   297     }
   294 
   298 
   295         /**
   299     /**
   296          * Returns a new array that is a copy of this <code>SerialArray</code>
   300      * Returns a new array that is a copy of this <code>SerialArray</code>
   297          * object.
   301      * object.
   298          *
   302      *
   299          * @return a copy of this <code>SerialArray</code> object as an
   303      * @return a copy of this <code>SerialArray</code> object as an
   300          *         <code>Object</code> in the Java programming language
   304      *         <code>Object</code> in the Java programming language
   301          * @throws SerialException if an error occurs retrieving a copy of
   305      * @throws SerialException if an error occurs;
   302      *         this <code>SerialArray</code> object
   306      * if {@code free} had previously been called on this object
   303          */
   307      */
   304     public Object getArray() throws SerialException {
   308     public Object getArray() throws SerialException {
       
   309         isValid();
   305         Object dst = new Object[len];
   310         Object dst = new Object[len];
   306         System.arraycopy((Object)elements, 0, dst, 0, len);
   311         System.arraycopy((Object)elements, 0, dst, 0, len);
   307         return dst;
   312         return dst;
   308     }
   313     }
   309 
   314 
   310  //[if an error occurstype map used??]
   315  //[if an error occurstype map used??]
   311         /**
   316     /**
   312          * Returns a new array that is a copy of this <code>SerialArray</code>
   317      * Returns a new array that is a copy of this <code>SerialArray</code>
   313          * object, using the given type map for the custom
   318      * object, using the given type map for the custom
   314          * mapping of each element when the elements are SQL UDTs.
   319      * mapping of each element when the elements are SQL UDTs.
   315          * <P>
   320      * <P>
   316          * This method does custom mapping if the array elements are a UDT
   321      * This method does custom mapping if the array elements are a UDT
   317          * and the given type map has an entry for that UDT.
   322      * and the given type map has an entry for that UDT.
   318      * Custom mapping is recursive,
   323      * Custom mapping is recursive,
   319          * meaning that if, for instance, an element of an SQL structured type
   324      * meaning that if, for instance, an element of an SQL structured type
   320          * is an SQL structured type that itself has an element that is an SQL
   325      * is an SQL structured type that itself has an element that is an SQL
   321          * structured type, each structured type that has a custom mapping will be
   326      * structured type, each structured type that has a custom mapping will be
   322          * mapped according to the given type map.
   327      * mapped according to the given type map.
   323          *
   328      *
   324      * @param map a <code>java.util.Map</code> object in which
   329      * @param map a <code>java.util.Map</code> object in which
   325      *        each entry consists of 1) a <code>String</code> object
   330      *        each entry consists of 1) a <code>String</code> object
   326      *        giving the fully qualified name of a UDT and 2) the
   331      *        giving the fully qualified name of a UDT and 2) the
   327      *        <code>Class</code> object for the <code>SQLData</code> implementation
   332      *        <code>Class</code> object for the <code>SQLData</code> implementation
   328      *        that defines how the UDT is to be mapped
   333      *        that defines how the UDT is to be mapped
   329          * @return a copy of this <code>SerialArray</code> object as an
   334      * @return a copy of this <code>SerialArray</code> object as an
   330          *         <code>Object</code> in the Java programming language
   335      *         <code>Object</code> in the Java programming language
   331          * @throws SerialException if an error occurs
   336      * @throws SerialException if an error occurs;
   332          */
   337      * if {@code free} had previously been called on this object
       
   338      */
   333     public Object getArray(Map<String, Class<?>> map) throws SerialException {
   339     public Object getArray(Map<String, Class<?>> map) throws SerialException {
       
   340         isValid();
   334         Object dst[] = new Object[len];
   341         Object dst[] = new Object[len];
   335         System.arraycopy((Object)elements, 0, dst, 0, len);
   342         System.arraycopy((Object)elements, 0, dst, 0, len);
   336         return dst;
   343         return dst;
   337     }
   344     }
   338 
   345 
   339         /**
   346     /**
   340          * Returns a new array that is a copy of a slice
   347      * Returns a new array that is a copy of a slice
   341          * of this <code>SerialArray</code> object, starting with the
   348      * of this <code>SerialArray</code> object, starting with the
   342          * element at the given index and containing the given number
   349      * element at the given index and containing the given number
   343          * of consecutive elements.
   350      * of consecutive elements.
   344          *
   351      *
   345          * @param index the index into this <code>SerialArray</code> object
   352      * @param index the index into this <code>SerialArray</code> object
   346          *              of the first element to be copied;
   353      *              of the first element to be copied;
   347          *              the index of the first element is <code>0</code>
   354      *              the index of the first element is <code>0</code>
   348          * @param count the number of consecutive elements to be copied, starting
   355      * @param count the number of consecutive elements to be copied, starting
   349          *              at the given index
   356      *              at the given index
   350          * @return a copy of the designated elements in this <code>SerialArray</code>
   357      * @return a copy of the designated elements in this <code>SerialArray</code>
   351          *         object as an <code>Object</code> in the Java programming language
   358      *         object as an <code>Object</code> in the Java programming language
   352          * @throws SerialException if an error occurs
   359      * @throws SerialException if an error occurs;
   353          */
   360      * if {@code free} had previously been called on this object
       
   361      */
   354     public Object getArray(long index, int count) throws SerialException {
   362     public Object getArray(long index, int count) throws SerialException {
       
   363         isValid();
   355         Object dst = new Object[count];
   364         Object dst = new Object[count];
   356         System.arraycopy((Object)elements, (int)index, dst, 0, count);
   365         System.arraycopy((Object)elements, (int)index, dst, 0, count);
   357         return dst;
   366         return dst;
   358     }
   367     }
   359 
   368 
   360         /**
   369     /**
   361          * Returns a new array that is a copy of a slice
   370      * Returns a new array that is a copy of a slice
   362          * of this <code>SerialArray</code> object, starting with the
   371      * of this <code>SerialArray</code> object, starting with the
   363          * element at the given index and containing the given number
   372      * element at the given index and containing the given number
   364          * of consecutive elements.
   373      * of consecutive elements.
   365          * <P>
   374      * <P>
   366          * This method does custom mapping if the array elements are a UDT
   375      * This method does custom mapping if the array elements are a UDT
   367          * and the given type map has an entry for that UDT.
   376      * and the given type map has an entry for that UDT.
   368      * Custom mapping is recursive,
   377      * Custom mapping is recursive,
   369          * meaning that if, for instance, an element of an SQL structured type
   378      * meaning that if, for instance, an element of an SQL structured type
   370          * is an SQL structured type that itself has an element that is an SQL
   379      * is an SQL structured type that itself has an element that is an SQL
   371          * structured type, each structured type that has a custom mapping will be
   380      * structured type, each structured type that has a custom mapping will be
   372          * mapped according to the given type map.
   381      * mapped according to the given type map.
   373          *
   382      *
   374          * @param index the index into this <code>SerialArray</code> object
   383      * @param index the index into this <code>SerialArray</code> object
   375          *              of the first element to be copied; the index of the
   384      *              of the first element to be copied; the index of the
   376          *              first element in the array is <code>0</code>
   385      *              first element in the array is <code>0</code>
   377          * @param count the number of consecutive elements to be copied, starting
   386      * @param count the number of consecutive elements to be copied, starting
   378          *              at the given index
   387      *              at the given index
   379      * @param map a <code>java.util.Map</code> object in which
   388      * @param map a <code>java.util.Map</code> object in which
   380      *        each entry consists of 1) a <code>String</code> object
   389      *        each entry consists of 1) a <code>String</code> object
   381      *        giving the fully qualified name of a UDT and 2) the
   390      *        giving the fully qualified name of a UDT and 2) the
   382      *        <code>Class</code> object for the <code>SQLData</code> implementation
   391      *        <code>Class</code> object for the <code>SQLData</code> implementation
   383      *        that defines how the UDT is to be mapped
   392      *        that defines how the UDT is to be mapped
   384          * @return a copy of the designated elements in this <code>SerialArray</code>
   393      * @return a copy of the designated elements in this <code>SerialArray</code>
   385          *         object as an <code>Object</code> in the Java programming language
   394      *         object as an <code>Object</code> in the Java programming language
   386          * @throws SerialException if an error occurs
   395      * @throws SerialException if an error occurs;
   387          */
   396      * if {@code free} had previously been called on this object
       
   397      */
   388     public Object getArray(long index, int count, Map<String,Class<?>> map)
   398     public Object getArray(long index, int count, Map<String,Class<?>> map)
   389         throws SerialException
   399         throws SerialException
   390     {
   400     {
       
   401         isValid();
   391         Object dst = new Object[count];
   402         Object dst = new Object[count];
   392         System.arraycopy((Object)elements, (int)index, dst, 0, count);
   403         System.arraycopy((Object)elements, (int)index, dst, 0, count);
   393         return dst;
   404         return dst;
   394     }
   405     }
   395 
   406 
   396         /**
   407     /**
   397          * Retrieves the SQL type of the elements in this <code>SerialArray</code>
   408      * Retrieves the SQL type of the elements in this <code>SerialArray</code>
   398          * object.  The <code>int</code> returned is one of the constants in the class
   409      * object.  The <code>int</code> returned is one of the constants in the class
   399          * <code>java.sql.Types</code>.
   410      * <code>java.sql.Types</code>.
   400          *
   411      *
   401          * @return one of the constants in <code>java.sql.Types</code>, indicating
   412      * @return one of the constants in <code>java.sql.Types</code>, indicating
   402          *         the SQL type of the elements in this <code>SerialArray</code> object
   413      *         the SQL type of the elements in this <code>SerialArray</code> object
   403          * @throws SerialException if an error occurs
   414      * @throws SerialException if an error occurs;
   404          */
   415      * if {@code free} had previously been called on this object
       
   416      */
   405     public int getBaseType() throws SerialException {
   417     public int getBaseType() throws SerialException {
       
   418         isValid();
   406         return baseType;
   419         return baseType;
   407     }
   420     }
   408 
   421 
   409         /**
   422     /**
   410          * Retrieves the DBMS-specific type name for the elements in this
   423      * Retrieves the DBMS-specific type name for the elements in this
   411          * <code>SerialArray</code> object.
   424      * <code>SerialArray</code> object.
   412          *
   425      *
   413          * @return the SQL type name used by the DBMS for the base type of this
   426      * @return the SQL type name used by the DBMS for the base type of this
   414      *         <code>SerialArray</code> object
   427      *         <code>SerialArray</code> object
   415          * @throws SerialException if an error occurs
   428      * @throws SerialException if an error occurs;
   416          */
   429      * if {@code free} had previously been called on this object
       
   430      */
   417     public String getBaseTypeName() throws SerialException {
   431     public String getBaseTypeName() throws SerialException {
       
   432         isValid();
   418         return baseTypeName;
   433         return baseTypeName;
   419     }
   434     }
   420 
   435 
   421     /**
   436     /**
   422      * Retrieves a <code>ResultSet</code> object holding the elements of
   437      * Retrieves a <code>ResultSet</code> object holding the elements of
   432      * @param count the number of consecutive elements to be copied, starting
   447      * @param count the number of consecutive elements to be copied, starting
   433      *         at the given index
   448      *         at the given index
   434      * @return a <code>ResultSet</code> object containing the designated
   449      * @return a <code>ResultSet</code> object containing the designated
   435      *         elements in this <code>SerialArray</code> object, with a
   450      *         elements in this <code>SerialArray</code> object, with a
   436      *         separate row for each element
   451      *         separate row for each element
   437      * @throws SerialException, which in turn throws an
   452      * @throws SerialException if called with the cause set to
   438      *         <code>UnsupportedOperationException</code>, if this method is called
   453      *         {@code UnsupportedOperationException}
   439      */
   454      */
   440     public ResultSet getResultSet(long index, int count) throws SerialException {
   455     public ResultSet getResultSet(long index, int count) throws SerialException {
   441         throw new UnsupportedOperationException();
   456         SerialException se = new SerialException();
       
   457         se.initCause(new UnsupportedOperationException());
       
   458         throw  se;
   442     }
   459     }
   443 
   460 
   444     /**
   461     /**
   445      *
   462      *
   446      * Retrieves a <code>ResultSet</code> object that contains all of
   463      * Retrieves a <code>ResultSet</code> object that contains all of
   459      *        <code>Class</code> object for the <code>SQLData</code> implementation
   476      *        <code>Class</code> object for the <code>SQLData</code> implementation
   460      *        that defines how the UDT is to be mapped
   477      *        that defines how the UDT is to be mapped
   461      * @return a <code>ResultSet</code> object containing all of the
   478      * @return a <code>ResultSet</code> object containing all of the
   462      *         elements in this <code>SerialArray</code> object, with a
   479      *         elements in this <code>SerialArray</code> object, with a
   463      *         separate row for each element
   480      *         separate row for each element
   464      * @throws SerialException, which in turn throws an
   481      * @throws SerialException if called with the cause set to
   465      *         <code>UnsupportedOperationException</code>, if this method is called
   482      *         {@code UnsupportedOperationException}
   466      */
   483      */
   467     public ResultSet getResultSet(Map<String, Class<?>> map)
   484     public ResultSet getResultSet(Map<String, Class<?>> map)
   468         throws SerialException
   485         throws SerialException
   469     {
   486     {
   470         throw new UnsupportedOperationException();
   487         SerialException se = new SerialException();
       
   488         se.initCause(new UnsupportedOperationException());
       
   489         throw  se;
   471     }
   490     }
   472 
   491 
   473     /**
   492     /**
   474      * Retrieves a <code>ResultSet</code> object that contains all of
   493      * Retrieves a <code>ResultSet</code> object that contains all of
   475      * the elements in the <code>ARRAY</code> value that this
   494      * the elements in the <code>ARRAY</code> value that this
   478      * type map; otherwise, the standard mapping is used.
   497      * type map; otherwise, the standard mapping is used.
   479      *
   498      *
   480      * @return a <code>ResultSet</code> object containing all of the
   499      * @return a <code>ResultSet</code> object containing all of the
   481      *         elements in this <code>SerialArray</code> object, with a
   500      *         elements in this <code>SerialArray</code> object, with a
   482      *         separate row for each element
   501      *         separate row for each element
   483      * @throws SerialException if called, which in turn throws an
   502      * @throws SerialException if called with the cause set to
   484      *         <code>UnsupportedOperationException</code>, if this method is called
   503      *         {@code UnsupportedOperationException}
   485      */
   504      */
   486     public ResultSet getResultSet() throws SerialException {
   505     public ResultSet getResultSet() throws SerialException {
   487         throw new UnsupportedOperationException();
   506         SerialException se = new SerialException();
       
   507         se.initCause(new UnsupportedOperationException());
       
   508         throw  se;
   488     }
   509     }
   489 
   510 
   490 
   511 
   491     /**
   512     /**
   492      * Retrieves a result set holding the elements of the subarray that starts at
   513      * Retrieves a result set holding the elements of the subarray that starts at
   512      *        <code>Class</code> object for the <code>SQLData</code> implementation
   533      *        <code>Class</code> object for the <code>SQLData</code> implementation
   513      *        that defines how the UDT is to be mapped
   534      *        that defines how the UDT is to be mapped
   514      * @return a <code>ResultSet</code> object containing the designated
   535      * @return a <code>ResultSet</code> object containing the designated
   515      *         elements in this <code>SerialArray</code> object, with a
   536      *         elements in this <code>SerialArray</code> object, with a
   516      *         separate row for each element
   537      *         separate row for each element
   517      * @throws SerialException if called, which in turn throws an
   538      * @throws SerialException if called with the cause set to
   518      *         <code>UnsupportedOperationException</code>
   539      *         {@code UnsupportedOperationException}
   519      */
   540      */
   520     public ResultSet getResultSet(long index, int count,
   541     public ResultSet getResultSet(long index, int count,
   521                                   Map<String,Class<?>> map)
   542                                   Map<String,Class<?>> map)
   522         throws SerialException
   543         throws SerialException
   523     {
   544     {
   524         throw new UnsupportedOperationException();
   545         SerialException se = new SerialException();
   525     }
   546         se.initCause(new UnsupportedOperationException());
       
   547         throw  se;
       
   548     }
       
   549 
   526 
   550 
   527     /**
   551     /**
   528      * Compares this SerialArray to the specified object.  The result is {@code
   552      * Compares this SerialArray to the specified object.  The result is {@code
   529      * true} if and only if the argument is not {@code null} and is a {@code
   553      * true} if and only if the argument is not {@code null} and is a {@code
   530      * SerialArray} object whose elements are identical to this object's elements
   554      * SerialArray} object whose elements are identical to this object's elements
   564     /**
   588     /**
   565      * Returns a clone of this {@code SerialArray}. The copy will contain a
   589      * Returns a clone of this {@code SerialArray}. The copy will contain a
   566      * reference to a clone of the underlying objects array, not a reference
   590      * reference to a clone of the underlying objects array, not a reference
   567      * to the original underlying object array of this {@code SerialArray} object.
   591      * to the original underlying object array of this {@code SerialArray} object.
   568      *
   592      *
   569      * @return  a clone of this SerialArray
   593      * @return a clone of this SerialArray
   570      */
   594      */
   571     public Object clone() {
   595     public Object clone() {
   572         try {
   596         try {
   573             SerialArray sa = (SerialArray) super.clone();
   597             SerialArray sa = (SerialArray) super.clone();
   574             sa.elements = Arrays.copyOf(elements, len);
   598             sa.elements = (elements != null) ? Arrays.copyOf(elements, len) : null;
   575             return sa;
   599             return sa;
   576         } catch (CloneNotSupportedException ex) {
   600         } catch (CloneNotSupportedException ex) {
   577             // this shouldn't happen, since we are Cloneable
   601             // this shouldn't happen, since we are Cloneable
   578             throw new InternalError();
   602             throw new InternalError();
   579         }
   603         }
   614         fields.put("baseTypeName", baseTypeName);
   638         fields.put("baseTypeName", baseTypeName);
   615         s.writeFields();
   639         s.writeFields();
   616     }
   640     }
   617 
   641 
   618     /**
   642     /**
       
   643      * Check to see if this object had previously had its {@code free} method
       
   644      * called
       
   645      *
       
   646      * @throws SerialException
       
   647      */
       
   648     private void isValid() throws SerialException {
       
   649         if (elements == null) {
       
   650             throw new SerialException("Error: You cannot call a method on a "
       
   651                     + "SerialArray instance once free() has been called.");
       
   652         }
       
   653     }
       
   654 
       
   655     /**
   619      * The identifier that assists in the serialization of this <code>SerialArray</code>
   656      * The identifier that assists in the serialization of this <code>SerialArray</code>
   620      * object.
   657      * object.
   621      */
   658      */
   622     static final long serialVersionUID = -8466174297270688520L;
   659     static final long serialVersionUID = -8466174297270688520L;
   623 }
   660 }