1 |
| package org.jboss.cache.marshall; |
2 |
| |
3 |
| import org.jboss.util.stream.MarshalledValueInputStream; |
4 |
| |
5 |
| import java.io.ByteArrayInputStream; |
6 |
| import java.io.IOException; |
7 |
| import java.io.InputStream; |
8 |
| import java.io.ObjectInputStream; |
9 |
| import java.io.ObjectOutputStream; |
10 |
| import java.io.OutputStream; |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| class JavaObjectStreamFactory implements ObjectStreamFactory |
20 |
| { |
21 |
| |
22 |
327158
| public ObjectInputStream createObjectInputStream(byte[] bytes) throws IOException
|
23 |
| { |
24 |
327158
| ByteArrayInputStream in = new ByteArrayInputStream(bytes);
|
25 |
327158
| return new MarshalledValueInputStream(in);
|
26 |
| } |
27 |
| |
28 |
36187
| public ObjectInputStream createObjectInputStream(InputStream in) throws IOException
|
29 |
| { |
30 |
36187
| return new MarshalledValueInputStream(in);
|
31 |
| } |
32 |
| |
33 |
359629
| public ObjectOutputStream createObjectOutputStream(OutputStream out) throws IOException
|
34 |
| { |
35 |
359629
| return new ObjectOutputStream(out);
|
36 |
| } |
37 |
| |
38 |
| } |