@Override public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException { try { WeakReference<Object> obj = instantiate(); in.addRef(obj); Object value = in.readObject(); obj = null; return new WeakReference<Object>(value); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
@Override public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException { try { SoftReference<Object> obj = instantiate(); in.addRef(obj); Object value = in.readObject(); obj = null; return new SoftReference<Object>(value); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
private Object create(String name) throws IOException { if (name == null) throw new IOException(_enumType.getName() + " expects name."); try { return _valueOf.invoke(null, _enumType, name); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(String name) throws IOException { if (name == null) throw new IOException(_enumType.getName() + " expects name."); try { return _valueOf.invoke(null, _enumType, name); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(String name) throws IOException { if (name == null) throw new IOException(_enumType.getName() + " expects name."); try { return _valueOf.invoke(null, _enumType, name); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(String value) throws IOException { if (value == null) throw new IOException(_cl.getName() + " expects name."); try { return _constructor.newInstance(new Object[] { value }); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(String name) throws IOException { if (name == null) throw new IOException(_enumType.getName() + " expects name."); try { return _valueOf.invoke(null, _enumType, name); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(long initValue) throws IOException { if (initValue == Long.MIN_VALUE) throw new IOException(_cl.getName() + " expects name."); try { return _constructor.newInstance(new Object[] { new Long(initValue) }); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(long initValue) throws IOException { if (initValue == Long.MIN_VALUE) throw new IOException(_cl.getName() + " expects name."); try { return _constructor.newInstance(new Object[] { new Long(initValue) }); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(long initValue) throws IOException { if (initValue == Long.MIN_VALUE) throw new IOException(_cl.getName() + " expects name."); try { return _constructor.newInstance(new Object[] { new Long(initValue) }); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
private Object create(long initValue) throws IOException { if (initValue == Long.MIN_VALUE) throw new IOException(_cl.getName() + " expects name."); try { return _constructor.newInstance(new Object[] { new Long(initValue) }); } catch (Exception e) { throw new IOExceptionWrapper(e); } } }
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; try { if (_loader != null) return Class.forName(name, false, _loader); else return Class.forName(name); } catch (Exception e) { throw new IOExceptionWrapper(e); } }
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; try { if (_loader != null) return Class.forName(name, false, _loader); else return Class.forName(name); } catch (Exception e) { throw new IOExceptionWrapper(e); } }
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; try { if (_loader != null) return Class.forName(name, false, _loader); else return Class.forName(name); } catch (Exception e) { throw new IOExceptionWrapper(e); } }
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; try { if (_loader != null) return Class.forName(name, false, _loader); else return Class.forName(name); } catch (Exception e) { throw new IOExceptionWrapper(e); } }
private Map createMap() throws IOException { if (_type == null) return new HashMap(); else if (_type.equals(Map.class)) return new HashMap(); else if (_type.equals(SortedMap.class)) return new TreeMap(); else { try { return (Map) _ctor.newInstance(); } catch (Exception e) { throw new IOExceptionWrapper(e); } } } }
private Map createMap() throws IOException { if (_type == null) return new HashMap(); else if (_type.equals(Map.class)) return new HashMap(); else if (_type.equals(SortedMap.class)) return new TreeMap(); else { try { return (Map) _ctor.newInstance(); } catch (Exception e) { throw new IOExceptionWrapper(e); } } } }
private Map createMap() throws IOException { if (_type == null) return new HashMap(); else if (_type.equals(Map.class)) return new HashMap(); else if (_type.equals(SortedMap.class)) return new TreeMap(); else { try { return (Map) _ctor.newInstance(); } catch (Exception e) { throw new IOExceptionWrapper(e); } } } }
private Map createMap() throws IOException { if (_type == null) return new HashMap(); else if (_type.equals(Map.class)) return new HashMap(); else if (_type.equals(SortedMap.class)) return new TreeMap(); else { try { return (Map) _ctor.newInstance(); } catch (Exception e) { throw new IOExceptionWrapper(e); } } } }
public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(_type.getName() + ":" + e.getMessage(), e); } }