public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if ( deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public Encoder to(OutputStream out) throws IOException { if (deflate) out = new DeflaterOutputStream(out); return to(new OutputStreamWriter(out, encoding)); }
public void save() { if (!this.where.getParentFile().isDirectory() && !this.where.getParentFile().mkdirs()) throw new RuntimeException("Cannot create directory in " + this.where.getParent()); try { codec.enc().to(this.where).put(data).flush(); assert this.where.isFile(); } catch (Exception e) { throw new RuntimeException("Cannot write settings file " + this.where, e); } }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public Encoder put(Object object) throws Exception { if (app == null) to(); codec.encode(this, object, null, new IdentityHashMap<Object,Type>()); flush(); if (!keepOpen) close(); return this; }
public void update(String etag) throws Exception { this.dto.sha_1 = SHA1.digest(file) .asHex(); this.dto.sha_256 = SHA256.digest(file) .asHex(); this.dto.etag = etag; this.dto.modified = file.lastModified(); codec.enc() .to(jsonFile) .put(this.dto); }