Example #1
0
 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();
 }
Example #2
0
 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());
   }
 }
Example #3
0
 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());
   }
 }
Example #4
0
 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());
   }
 }
Example #5
0
 public void dump(Object obj, OutputStream out) {
   YamlEncoder enc = new YamlEncoder(out, this);
   enc.writeObject(obj);
   enc.close();
 }
Example #6
0
 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();
 }
Example #7
0
 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();
 }
Example #8
0
 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();
 }
Example #9
0
 public void dump(Object obj, File file) throws FileNotFoundException {
   YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), this);
   enc.writeObject(obj);
   enc.close();
 }