@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException, Exception { Iterable< ? > collection = (Iterable< ? >) object; app.append("["); String del = ""; for (Object o : collection) { app.append(del); app.encode(o, componentType, visited); del = ","; } app.append("]"); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
@Override public void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException, Exception { app.append(object.toString()); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
public byte[] digest() throws NoSuchAlgorithmException, IOException { if (digest == null) return null; append('\n'); return digest.digest(); }
@Override public void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException, Exception { app.append(object.toString()); }
@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException, Exception { app.append("["); String del = ""; int l = Array.getLength(object); for (int i = 0; i < l; i++) { app.append(del); app.encode(Array.get(object, i), componentType, visited); del = ","; } app.append("]"); }
@Override public void encode(Encoder app, Object object, Map<Object, Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override public void encode(Encoder app, Object object, Map<Object,Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override public void encode(Encoder app, Object object, Map<Object, Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override public void encode(Encoder app, Object object, Map<Object,Type> visited) throws Exception { String s = object.toString(); if (s.endsWith(".0")) s = s.substring(0, s.length() - 2); app.append(s); }
@Override public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception { File f = (File) object; if (!f.isFile()) throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f); try (InputStream in = IO.stream(f)) { app.append('"'); Base64.encode(in, app); app.append('"'); } }
@Override public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception { File f = (File) object; if (!f.isFile()) throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f); try (InputStream in = IO.stream(f)) { app.append('"'); Base64.encode(in, app); app.append('"'); } }