Package freenet.support

Examples of freenet.support.SimpleFieldSet.writeTo()


      fos = new FileOutputStream(dataBak);
      BufferedOutputStream bos = new BufferedOutputStream(fos);
      OutputStreamWriter osw = new OutputStreamWriter(bos, "UTF-8");
      BufferedWriter bw = new BufferedWriter(osw);
      SimpleFieldSet fs = getFieldset(bootID);
      fs.writeTo(bw);
      bw.flush();
      bw.close();
      fos = null;
      FileUtil.renameTo(dataBak, data);
    } catch (IOException e) {
View Full Code Here


    BufferedWriter bw = null;
    try {
      fos = new FileOutputStream(backup);
      osr = new OutputStreamWriter(fos, "UTF-8");
      bw = new BufferedWriter(osr);
      fs.writeTo(bw);

      bw.close();
      FileUtil.renameTo(backup, orig);
    } catch (IOException e) {
      Closer.close(bw);
View Full Code Here

    if(orig.exists()) backup.delete();

    FileOutputStream fos = null;
    try {
      fos = new FileOutputStream(backup);
      fs.writeTo(fos);
      fos.close();
      fos = null;
      FileUtil.renameTo(backup, orig);
    } catch (IOException ioe) {
      Logger.error(this, "IOE :"+ioe.getMessage(), ioe);
View Full Code Here

    try {
      SimpleFieldSet myFullNoderef = node.exportDarknetPublicFieldSet();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      DeflaterOutputStream dos = new DeflaterOutputStream(baos);
      try {
        myFullNoderef.writeTo(dos);
        dos.close();
      } catch (IOException e) {
        Logger.error(this, "Impossible: Caught error while writing compressed noderef: "+e, e);
        synchronized(this) {
          sendingFullNoderef = false;
View Full Code Here

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DeflaterOutputStream gis;
    gis = new DeflaterOutputStream(baos);
    try {
      fs.writeTo(gis);
                } catch (IOException e) {
                    Logger.error(this, "IOE :"+e.getMessage(), e);
    } finally {
      Closer.close(gis);
                        Closer.close(baos);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.