com.caucho.hessian.io.IOExceptionWrapper Java Examples
The following examples show how to use
com.caucho.hessian.io.IOExceptionWrapper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GenericClassDeserializer.java From sofa-hessian with Apache License 2.0 | 6 votes |
Object create(String name) throws IOException { if (name == null) { throw new IOException("Serialized Class expects name."); } Class cl = _primClasses.get(name); if (cl != null) { return cl; } ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { if (loader != null) { return Class.forName(name, false, loader); } else { return Class.forName(name); } } catch (Exception e) { throw new IOExceptionWrapper(e); } }
Example #2
Source File: LocalDateTimeDeserializer.java From jvm-sandbox-repeater with Apache License 2.0 | 5 votes |
private Object create(long initValue) throws IOException { if (initValue == Long.MIN_VALUE) { throw new IOException("java.time.LocalDateTime expects name"); } try { return LocalDateTime.ofEpochSecond(initValue / 1000, (int) (initValue % 1000) * 1000 * 1000, ZoneOffset.of("+8")); } catch (Exception e) { throw new IOExceptionWrapper(e); } }
Example #3
Source File: TranscribableEnumDeserializer.java From cougar with Apache License 2.0 | 5 votes |
private Object create(String name) throws IOException { if (name == null) { throw new IOException(_enumType.getName() + " expects name."); } try { return EnumUtils.readEnum(_enumType, name); } catch (EnumDerialisationException cfe) { throw cfe; } catch (Exception e) { throw new IOExceptionWrapper(e); } }