Rev 1306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
671 | jmachado | 1 | /* |
2 | * Copyright 2004 The Apache Software Foundation |
||
3 | * |
||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
5 | * you may not use this file except in compliance with the License. |
||
6 | * You may obtain a copy of the License at |
||
7 | * |
||
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
9 | * |
||
10 | * Unless required by applicable law or agreed to in writing, software |
||
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
13 | * See the License for the specific language governing permissions and |
||
14 | * limitations under the License. |
||
15 | */ |
||
16 | package pt.estgp.estgweb.utils; |
||
17 | |||
18 | import java.io.IOException; |
||
19 | import java.io.ObjectInputStream; |
||
20 | import java.io.ObjectOutputStream; |
||
21 | import java.io.Serializable; |
||
22 | import java.util.Collection; |
||
23 | import java.util.List; |
||
24 | |||
25 | /** |
||
26 | * Serializable subclass of AbstractListDecorator. |
||
27 | * |
||
28 | * @author Stephen Colebourne |
||
29 | * @since Commons Collections 3.1 |
||
30 | */ |
||
31 | public abstract class AbstractSerializableListDecorator |
||
32 | extends AbstractListDecorator |
||
33 | implements 1.5.0/docs/api/java/io/Serializable.html">Serializable { |
||
34 | |||
35 | /** Serialization version */ |
||
36 | private static final long serialVersionUID = 2684959196747496299L; |
||
37 | |||
38 | /** |
||
39 | * Constructor. |
||
40 | */ |
||
41 | protected AbstractSerializableListDecorator(5+0%2Fdocs%2Fapi+List">List list) { |
||
42 | super(list); |
||
43 | } |
||
44 | |||
45 | //----------------------------------------------------------------------- |
||
46 | /** |
||
47 | * Write the list out using a custom routine. |
||
48 | * |
||
49 | * @param out the output stream |
||
50 | * @throws java.io.IOException |
||
51 | */ |
||
52 | private void writeObject(1.5.0/docs/api/java/io/ObjectOutputStream.html">ObjectOutputStream out) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
||
53 | out.defaultWriteObject(); |
||
54 | out.writeObject(collection); |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Read the list in using a custom routine. |
||
59 | * |
||
60 | * @param in the input stream |
||
61 | * @throws java.io.IOException |
||
62 | * @throws ClassNotFoundException |
||
63 | */ |
||
64 | private void readObject(1.5.0/docs/api/java/io/ObjectInputStream.html">ObjectInputStream in) throws 1.5.0/docs/api/java/io/IOException.html">IOException, 1.5.0/docs/api/java/lang/ClassNotFoundException.html">ClassNotFoundException { |
||
65 | in.defaultReadObject(); |
||
66 | collection = (1.5.0/docs/api/java/util/Collection.html">Collection) in.readObject(); |
||
67 | } |
||
68 | |||
69 | } |