Examples of encodeToString()


Examples of org.apache.commons.codec.binary.Base64.encodeToString()

                    GSSCredential.ACCEPT_ONLY);
              }
              gssContext = gssManager.createContext(gssCreds);
              byte[] serverToken = gssContext.acceptSecContext(clientToken, 0, clientToken.length);
              if (serverToken != null && serverToken.length > 0) {
                String authenticate = base64.encodeToString(serverToken);
                response.setHeader(KerberosAuthenticator.WWW_AUTHENTICATE,
                                   KerberosAuthenticator.NEGOTIATE + " " + authenticate);
              }
              if (!gssContext.isEstablished()) {
                response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.encodeToString()

    DataOutputBuffer buf = new DataOutputBuffer();
    obj.write(buf);
    Base64 encoder = new Base64(0, null, true);
    byte[] raw = new byte[buf.getLength()];
    System.arraycopy(buf.getData(), 0, raw, 0, buf.getLength());
    return encoder.encodeToString(raw);
  }
 
  /**
   * Modify the writable to the value from the newValue
   * @param obj the object to read into
View Full Code Here

Examples of org.apache.commons.codec.binary.Base64.encodeToString()

          gssContext.requestMutualAuth(true);

          byte[] inToken = new byte[0];
          byte[] outToken = gssContext.initSecContext(inToken, 0, inToken.length);
          Base64 base64 = new Base64(0);
          return base64.encodeToString(outToken);

        } finally {
          if (gssContext != null) {
            gssContext.dispose();
          }
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleRevisionId.encodeToString()

                            }
                            String rev = depResolvedId.getRevision();
                            // The evicted modules have no description, so we can't put their
                            // status.
                            String status = depDescriptor == null ? "?" : depDescriptor.getStatus();
                            props.put(depRevisionId.encodeToString(), rev + " " + status);
                        }
                    }
                }
            }
            FileOutputStream out = new FileOutputStream(ivyPropertiesInCache);
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleRevisionId.encodeToString()

                            }
                            String rev = depResolvedId.getRevision();
                            // The evicted modules have no description, so we can't put their
                            // status.
                            String status = depDescriptor == null ? "?" : depDescriptor.getStatus();
                            props.put(depRevisionId.encodeToString(), rev + " " + status);
                        }
                    }
                }
            }
            FileOutputStream out = new FileOutputStream(ivyPropertiesInCache);
View Full Code Here

Examples of org.apache.ivy.core.module.id.ModuleRevisionId.encodeToString()

                            }
                            String rev = depResolvedId.getRevision();
                            // The evicted modules have no description, so we can't put their
                            // status.
                            String status = depDescriptor == null ? "?" : depDescriptor.getStatus();
                            props.put(depRevisionId.encodeToString(), rev + " " + status);
                        }
                    }
                }
            }
            FileOutputStream out = new FileOutputStream(ivyPropertiesInCache);
View Full Code Here

Examples of org.drools.util.codec.Base64.encodeToString()

                                    false,
                                    "" );

        Base64 enc = new Base64();
        String userpassword = "test" + ":" + "password";
        final String encodedAuthorization = enc.encodeToString( userpassword.getBytes() );

        Map<String, String> headers = new HashMap<String, String>() {
            {
                put( "Authorization",
                     "BASIC " + encodedAuthorization );
View Full Code Here

Examples of org.drools.util.codec.Base64.encodeToString()

                      assetnew.getName() );

        //check png
        Base64 enc = new Base64();
        String userpassword = "test" + ":" + "password";
        final String encodedAuthorization = enc.encodeToString( userpassword.getBytes() );
        Map<String, String> headers = new HashMap<String, String>() {
            {
                put( "Authorization",
                     "BASIC " + encodedAuthorization );
            }
View Full Code Here

Examples of org.drools.util.codec.Base64.encodeToString()

    repo.createPackage("testScenariosURL", "");
    impl.createPackageSnapshot("testScenariosURL", "SNAP1", false, "");

    Base64 enc = new Base64();
        String userpassword = "test" + ":" + "password";
        final String encodedAuthorization = enc.encodeToString( userpassword.getBytes() );     

        Map<String, String> headers = new HashMap<String, String>() {
            {
                put("Authorization", "BASIC " + encodedAuthorization);
            }
View Full Code Here

Examples of org.drools.util.codec.Base64.encodeToString()

                "SNAP1",
                false,
                "");

        Base64 enc = new Base64();
        final String encodedAuthorization = enc.encodeToString( "admin:admin".getBytes() );

        Map<String, String> headers = new HashMap<String, String>() {
            {
                put( "Authorization",
                     "BASIC " + encodedAuthorization );
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.