| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.util; |
| 17 | |
|
| 18 | |
import java.io.IOException; |
| 19 | |
import java.io.InputStream; |
| 20 | |
import java.io.ObjectInputStream; |
| 21 | |
|
| 22 | |
import org.seasar.framework.exception.ClassNotFoundRuntimeException; |
| 23 | |
import org.seasar.framework.exception.IORuntimeException; |
| 24 | |
import org.seasar.teeda.core.render.TeedaObjectInputStream; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
public class ObjectInputStreamUtil { |
| 30 | |
|
| 31 | 0 | private ObjectInputStreamUtil() { |
| 32 | 0 | } |
| 33 | |
|
| 34 | |
public static ObjectInputStream getInputStream(InputStream is) { |
| 35 | |
try { |
| 36 | 7 | return new TeedaObjectInputStream(is); |
| 37 | 1 | } catch (IOException e) { |
| 38 | 1 | throw new IORuntimeException(e); |
| 39 | |
} |
| 40 | |
} |
| 41 | |
|
| 42 | |
public static Object readObject(ObjectInputStream ois) { |
| 43 | |
try { |
| 44 | 5 | return ois.readObject(); |
| 45 | 0 | } catch (IOException e) { |
| 46 | 0 | throw new IORuntimeException(e); |
| 47 | 0 | } catch (ClassNotFoundException e) { |
| 48 | 0 | throw new ClassNotFoundRuntimeException(e); |
| 49 | |
} |
| 50 | |
} |
| 51 | |
|
| 52 | |
} |