コード例 #1
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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();
 }
コード例 #2
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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());
   }
 }
コード例 #3
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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());
   }
 }
コード例 #4
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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());
   }
 }
コード例 #5
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 public void dump(Object obj, OutputStream out) {
   YamlEncoder enc = new YamlEncoder(out, this);
   enc.writeObject(obj);
   enc.close();
 }
コード例 #6
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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();
 }
コード例 #7
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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();
 }
コード例 #8
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 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();
 }
コード例 #9
0
ファイル: YamlConfig.java プロジェクト: yafengli/jyaml
 public void dump(Object obj, File file) throws FileNotFoundException {
   YamlEncoder enc = new YamlEncoder(new FileOutputStream(file), this);
   enc.writeObject(obj);
   enc.close();
 }