/** * Reads the vector following a <code>Type.VECTOR</code> code. * * @return the obtained vector * @throws IOException */ @SuppressWarnings("unchecked") public ArrayList readVector() throws IOException { int length = readVectorHeader(); ArrayList result = new ArrayList(length); for (int i = 0; i < length; i++) { result.add(read()); } return result; }
/** * Reads the list following a <code>Type.LIST</code> code. * * @return the obtained list * @throws IOException */ @SuppressWarnings("unchecked") public List readList() throws IOException { List list = new ArrayList(); Object obj = read(); while (obj != null) { list.add(obj); obj = read(); } return list; }
/** * Reads the map following a <code>Type.MAP</code> code. * * @return the obtained map * @throws IOException */ @SuppressWarnings("unchecked") public TreeMap readMap() throws IOException { int length = readMapHeader(); TreeMap result = new TreeMap(); for (int i = 0; i < length; i++) { Object key = read(); Object value = read(); result.put(key, value); } return result; }
/** * Reads the vector following a <code>Type.VECTOR</code> code. * * @return the obtained vector * @throws IOException */ @SuppressWarnings("unchecked") public ArrayList readVector() throws IOException { int length = readVectorHeader(); ArrayList result = new ArrayList(length); for (int i = 0; i < length; i++) { result.add(read()); } return result; }
/** * Reads the map following a <code>Type.MAP</code> code. * * @return the obtained map * @throws IOException */ @SuppressWarnings("unchecked") public TreeMap readMap() throws IOException { int length = readMapHeader(); TreeMap result = new TreeMap(); for (int i = 0; i < length; i++) { Object key = read(); Object value = read(); result.put(key, value); } return result; }
/** Get the typed bytes as a Java object. */ public Object getValue() { try { ByteArrayInputStream bais = new ByteArrayInputStream(getBytes()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; } catch (IOException e) { throw new RuntimeException(e); } }
/** * Reads the vector following a <code>Type.VECTOR</code> code. * * @return the obtained vector * @throws IOException */ @SuppressWarnings("unchecked") public ArrayList readVector() throws IOException { int length = readVectorHeader(); ArrayList result = new ArrayList(length); for (int i = 0; i < length; i++) { result.add(read()); } return result; }
/** * Reads the map following a <code>Type.MAP</code> code. * * @return the obtained map * @throws IOException */ @SuppressWarnings("unchecked") public TreeMap readMap() throws IOException { int length = readMapHeader(); TreeMap result = new TreeMap(); for (int i = 0; i < length; i++) { Object key = read(); Object value = read(); result.put(key, value); } return result; }
/** * Reads the list following a <code>Type.LIST</code> code. * * @return the obtained list * @throws IOException */ @SuppressWarnings("unchecked") public List readList() throws IOException { List list = new ArrayList(); Object obj = read(); while (obj != null) { list.add(obj); obj = read(); } return list; }
/** * Reads the vector following a <code>Type.VECTOR</code> code. * * @return the obtained vector * @throws IOException */ @SuppressWarnings("unchecked") public ArrayList readVector() throws IOException { int length = readVectorHeader(); ArrayList result = new ArrayList(length); for (int i = 0; i < length; i++) { result.add(read()); } return result; }
/** * Reads the map following a <code>Type.MAP</code> code. * * @return the obtained map * @throws IOException */ @SuppressWarnings("unchecked") public TreeMap readMap() throws IOException { int length = readMapHeader(); TreeMap result = new TreeMap(); for (int i = 0; i < length; i++) { Object key = read(); Object value = read(); result.put(key, value); } return result; }
/** * Reads the list following a <code>Type.LIST</code> code. * * @return the obtained list * @throws IOException */ @SuppressWarnings("unchecked") public List readList() throws IOException { List list = new ArrayList(); Object obj = read(); while (obj != null) { list.add(obj); obj = read(); } return list; }
/** * Reads the vector following a <code>Type.VECTOR</code> code. * * @return the obtained vector * @throws IOException */ @SuppressWarnings("unchecked") public ArrayList readVector() throws IOException { int length = readVectorHeader(); ArrayList result = new ArrayList(length); for (int i = 0; i < length; i++) { result.add(read()); } return result; }
/** * Reads the map following a <code>Type.MAP</code> code. * * @return the obtained map * @throws IOException */ @SuppressWarnings("unchecked") public TreeMap readMap() throws IOException { int length = readMapHeader(); TreeMap result = new TreeMap(); for (int i = 0; i < length; i++) { Object key = read(); Object value = read(); result.put(key, value); } return result; }
/** * Reads the list following a <code>Type.LIST</code> code. * * @return the obtained list * @throws IOException */ @SuppressWarnings("unchecked") public List readList() throws IOException { List list = new ArrayList(); Object obj = read(); while (obj != null) { list.add(obj); obj = read(); } return list; }
/** * Reads the list following a <code>Type.LIST</code> code. * * @return the obtained list * @throws IOException */ @SuppressWarnings("unchecked") public List readList() throws IOException { List list = new ArrayList(); Object obj = read(); while (obj != null) { list.add(obj); obj = read(); } return list; }
/** Get the typed bytes as a Java object. */ public Object getValue() { try { ByteArrayInputStream bais = new ByteArrayInputStream(getBytes()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; } catch (IOException e) { throw new RuntimeException(e); } }
/** Get the typed bytes as a Java object. */ public Object getValue() { try { ByteArrayInputStream bais = new ByteArrayInputStream(get()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; } catch (IOException e) { throw new RuntimeException(e); } }
/** Get the typed bytes as a Java object. */ public Object getValue() { try { ByteArrayInputStream bais = new ByteArrayInputStream(getBytes()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; } catch (IOException e) { throw new RuntimeException(e); } }
/** Get the typed bytes as a Java object. */ public Object getValue() { try { ByteArrayInputStream bais = new ByteArrayInputStream(getBytes()); TypedBytesInput tbi = TypedBytesInput.get(new DataInputStream(bais)); Object obj = tbi.read(); return obj; } catch (IOException e) { throw new RuntimeException(e); } }