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