Examples of toOrderedString()


Examples of freenet.support.SimpleFieldSet.toOrderedString()

         System.out.println("Sent data");
         while(true) {
             name = lis.readLine(65536, 128, true);
             fs = new SimpleFieldSet(lis, 65536, 128, true, false, true);
           System.out.println("Got FCP message: \n"+name);
           System.out.print(fs.toOrderedString());
           if(name.equals("ProtocolError")) {
             System.err.println("Protocol error when inserting data.");
             System.exit(EXIT_INSERTER_PROBLEM);
           }
           if(name.equals("PutFailed")) {
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

      SimpleFieldSet sfs = this.base.getOverrideForCurrentLanguageTranslation();
      if(sfs == null) {
        super.sendErrorPage(ctx, 503 /* Service Unavailable */, "Service Unavailable", l10n("noCustomTranslations"));
        return;
      }
      byte[] data = sfs.toOrderedString().getBytes("UTF-8");
      MultiValueTable<String, String> head = new MultiValueTable<String, String>();
      head.put("Content-Disposition", "attachment; filename=\"" + this.base.getL10nOverrideFileName(this.base.getSelectedLanguage()) + '"');
      ctx.sendReplyHeaders(200, "Found", head, "text/plain; charset=utf-8", data.length);
      ctx.writeData(data);
      return;
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

public class PluginStoreTest extends TestCase {
   
    private void check(PluginStore store) throws IllegalBase64Exception, FSParseException {
        SimpleFieldSet fs = store.exportStoreAsSFS();
        PluginStore copyStore = new PluginStore(fs);
        assertEquals(fs.toOrderedString(), copyStore.exportStoreAsSFS().toOrderedString());
    }

    /** These are not allowed in SFS except base64 encoded when the always allow base64 flag is on.
     * So they ARE allowed in PluginStore's. */
    private String invalidCharsForSFS = "\r\n"+SimpleFieldSet.KEYVALUE_SEPARATOR_CHAR+
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

    if(!forAnonInitiator) {
      // Anonymous initiator setup type specifies whether the node is opennet or not.
      fs.put("opennet", isOpennet);
      synchronized (referenceSync) {
        if(myReferenceSignature == null || myReferenceECDSASignature == null || mySignedReference == null || !mySignedReference.equals(fs.toOrderedString())){
          mySignedReference = fs.toOrderedString();
          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

    if(!forAnonInitiator) {
      // Anonymous initiator setup type specifies whether the node is opennet or not.
      fs.put("opennet", isOpennet);
      synchronized (referenceSync) {
        if(myReferenceSignature == null || myReferenceECDSASignature == null || mySignedReference == null || !mySignedReference.equals(fs.toOrderedString())){
          mySignedReference = fs.toOrderedString();
          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
              fs.putSingle("sigP256", myReferenceECDSASignature);
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
              fs.putSingle("sigP256", myReferenceECDSASignature);
              mySignedReference = fs.toOrderedString();
              myReferenceSignature = signRef(mySignedReference);
          } catch (NodeInitException e) {
            node.exit(e.exitCode);
          }
        }
View Full Code Here

Examples of freenet.support.SimpleFieldSet.toOrderedString()

        }
        fs.putSingle("sig", myReferenceSignature.toLongString());
      }
    }

    if(logMINOR) Logger.minor(this, "My reference: "+fs.toOrderedString());
    return fs;
  }

  SimpleFieldSet exportPublicCryptoFieldSet(boolean forSetup, boolean forAnonInitiator) {
    SimpleFieldSet fs = new SimpleFieldSet(true);
View Full Code Here

Examples of org.kiji.schema.KijiURI.toOrderedString()

        KijiURI.newBuilder("kiji-hbase://(zkhost1,zkhost2):1234/instance/table/col/").build();
    KijiURI reversedQuorumUri =
        KijiURI.newBuilder("kiji-hbase://(zkhost2,zkhost1):1234/instance/table/col/").build();
    assertFalse(uri.getZookeeperQuorumOrdered()
            .equals(reversedQuorumUri.getZookeeperQuorumOrdered()));
    assertFalse(uri.toOrderedString().equals(reversedQuorumUri.toOrderedString()));
  }

  @Test
  public void testOrderedColumns() {
    KijiURI uri =
View Full Code Here

Examples of org.kiji.schema.KijiURI.toOrderedString()

  public void testOrderedColumns() {
    KijiURI uri =
        KijiURI.newBuilder("kiji-hbase://(zkhost1,zkhost2):1234/instance/table/col1,col2/").build();
    KijiURI reversedColumnURI =
        KijiURI.newBuilder("kiji-hbase://(zkhost1,zkhost2):1234/instance/table/col2,col1/").build();
    assertFalse(uri.toOrderedString().equals(reversedColumnURI.toOrderedString()));
    assertFalse(uri.getColumnsOrdered().equals(reversedColumnURI.getColumnsOrdered()));
  }

  /**
   * Tests that KijiURI.newBuilder().build() builds a URI for the default Kiji instance URI.
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.