public void dumpStream(Iterator iterator, File file, boolean minimalOutput) throws FileNotFoundException { YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), (YamlConfig) this.clone()); enc.setMinimalOutput(minimalOutput); while (iterator.hasNext()) enc.writeObject(iterator.next()); enc.close(); }
public String dumpStream(Iterator iterator) { ByteArrayOutputStream out = new ByteArrayOutputStream(); YamlEncoder enc = new YamlEncoder(out, this); while (iterator.hasNext()) enc.writeObject(iterator.next()); enc.close(); try { return new String(out.toByteArray(), getEncoding()); } catch (UnsupportedEncodingException e) { throw new YamlException("Unsupported encoding " + getEncoding()); } }
public String dump(Object obj) { ByteArrayOutputStream out = new ByteArrayOutputStream(); YamlEncoder enc = new YamlEncoder(out, this); enc.writeObject(obj); enc.close(); try { return new String(out.toByteArray(), getEncoding()); } catch (UnsupportedEncodingException e) { throw new YamlException("Unsupported encoding " + getEncoding()); } }
public String dump(Object obj, boolean minimalOutput) { ByteArrayOutputStream out = new ByteArrayOutputStream(); YamlEncoder enc = new YamlEncoder(out, (YamlConfig) this.clone()); enc.setMinimalOutput(minimalOutput); enc.writeObject(obj); enc.close(); try { return new String(out.toByteArray(), getEncoding()); } catch (UnsupportedEncodingException e) { throw new YamlException("Unsupported encoding " + getEncoding()); } }
public void dump(Object obj, OutputStream out) { YamlEncoder enc = new YamlEncoder(out, this); enc.writeObject(obj); enc.close(); }
public void dump(Object obj, OutputStream out, boolean minimalOutput) { YamlEncoder enc = new YamlEncoder(out, (YamlConfig) this.clone()); enc.setMinimalOutput(minimalOutput); enc.writeObject(obj); enc.close(); }
public void dumpStream(Iterator iterator, File file) throws FileNotFoundException { YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), this); while (iterator.hasNext()) enc.writeObject(iterator.next()); enc.close(); }
public void dump(Object obj, File file, boolean minimalOutput) throws FileNotFoundException { YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), (YamlConfig) this.clone()); enc.setMinimalOutput(minimalOutput); enc.writeObject(obj); enc.close(); }
public void dump(Object obj, File file) throws FileNotFoundException { YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), this); enc.writeObject(obj); enc.close(); }