public Object get() throws Exception { try { return codec.decode(null, this); } finally { if (!keepOpen) close(); } }
@SuppressWarnings("unchecked") public <T> T get(Class<T> clazz) throws Exception { try { return (T) codec.decode(clazz, this); } finally { if (!keepOpen) close(); } }
@SuppressWarnings("unchecked") public <T> T get(TypeReference<T> ref) throws Exception { try { return (T) codec.decode(ref.getType(), this); } finally { if (!keepOpen) close(); } }