119 |
* <code>private void readObject (ObjectInputStream)</code>. |
* <code>private void readObject (ObjectInputStream)</code>. |
120 |
* |
* |
121 |
* If an exception is thrown from this method, the stream is left in |
* If an exception is thrown from this method, the stream is left in |
122 |
* an undefined state. |
* an undefined state. This method can also throw Errors and |
123 |
|
* RuntimeExceptions if caused by existing readResolve() user code. |
124 |
|
* |
125 |
|
* @return The object read from the underlying stream. |
126 |
* |
* |
127 |
* @exception ClassNotFoundException The class that an object being |
* @exception ClassNotFoundException The class that an object being |
128 |
* read in belongs to cannot be found. |
* read in belongs to cannot be found. |
1576 |
catch (IllegalAccessException ignore) |
catch (IllegalAccessException ignore) |
1577 |
{ |
{ |
1578 |
} |
} |
1579 |
catch (InvocationTargetException ignore) |
catch (InvocationTargetException exception) |
1580 |
{ |
{ |
1581 |
|
Throwable cause = exception.getCause(); |
1582 |
|
if (cause instanceof ObjectStreamException) |
1583 |
|
throw (ObjectStreamException) cause; |
1584 |
|
else if (cause instanceof RuntimeException) |
1585 |
|
throw (RuntimeException) cause; |
1586 |
|
else if (cause instanceof Error) |
1587 |
|
throw (Error) cause; |
1588 |
} |
} |
1589 |
} |
} |
1590 |
|
|