Package org.servalproject.servaldna

Examples of org.servalproject.servaldna.BundleId


        out.println("received header " + e.getKey() + ": " + v);
  }

  private static RhizomeManifest manifestFromHeaders(HttpURLConnection conn) throws ServalDInterfaceException
  {
    BundleId id = header(conn, "Serval-Rhizome-Bundle-Id", BundleId.class);
    long version = headerUnsignedLong(conn, "Serval-Rhizome-Bundle-Version");
    long filesize = headerUnsignedLong(conn, "Serval-Rhizome-Bundle-Filesize");
    FileHash filehash = filesize == 0 ? null : header(conn, "Serval-Rhizome-Bundle-Filehash", FileHash.class);
    SubscriberId sender = headerOrNull(conn, "Serval-Rhizome-Bundle-Sender", SubscriberId.class);
    SubscriberId recipient = headerOrNull(conn, "Serval-Rhizome-Bundle-Recipient", SubscriberId.class);
View Full Code Here


      if (methodName.equals("rhizome-list"))
        rhizome_list();
      else if (methodName.equals("rhizome-list-newsince"))
        rhizome_list_newsince(args[1]);
      else if (methodName.equals("rhizome-manifest"))
        rhizome_manifest(new BundleId(args[1]), args[2]);
      else if (methodName.equals("rhizome-payload-raw"))
        rhizome_payload_raw(new BundleId(args[1]), args[2]);
      else if (methodName.equals("rhizome-payload-decrypted"))
        rhizome_payload_decrypted(new BundleId(args[1]), args[2]);
      else if (methodName.equals("rhizome-insert"))
        rhizome_insertargs[1], // author SID
                args[2], // manifest path
                args.length > 3 ? args[3] : null, // payload path
                args.length > 4 ? args[4] : null, // manifest out path
View Full Code Here

          for (int i = 1; i < fieldName.length(); ++i)
            if (!isFieldNameChar(fieldName.charAt(i)))
              throw new RhizomeManifestParseException("invalid field name at line " + lnum + ": " + line);
          try {
            if (fieldName.equals("id"))
              this.id = parseField(this.id, new BundleId(fieldValue));
            else if (fieldName.equals("version"))
              this.version = parseField(this.version, parseUnsignedLong(fieldValue));
            else if (fieldName.equals("filesize"))
              this.filesize = parseField(this.filesize, parseUnsignedLong(fieldValue));
            else if (fieldName.equals("filehash"))
View Full Code Here

TOP

Related Classes of org.servalproject.servaldna.BundleId

Copyright © 2018 www.massapicom. 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.