test_class.declarator: ENCODER = Base64.getEncoder()
test_class.modifier: protected static final
test_class.original_string: protected static final Encoder ENCODER = Base64.getEncoder();
test_class.type: Encoder
test_class.var_name: ENCODER
test_class.declarator: USERNAME = "ihaveaverylongname@onaverylongdomain.withaverylongtld"
test_class.modifier: protected static final
test_class.original_string: protected static final String USERNAME = "ihaveaverylongname@onaverylongdomain.withaverylongtld";
test_class.type: String
test_class.var_name: USERNAME
test_class.declarator: PASSWORD = "ohmypasswordislongtoo:abcdefghijklmnopqrstuvwxyz"
test_class.modifier: protected static final
test_class.original_string: protected static final String PASSWORD = "ohmypasswordislongtoo:abcdefghijklmnopqrstuvwxyz";
test_class.type: String
test_class.var_name: PASSWORD
test_class.file: nuxeo-java-client/src/test/java/org/nuxeo/client/util/TestBase64.java
test_class.identifier: TestBase64
test_case.body: @Test
      public void testEncode() {
          // compute token
          long ts = new Date().getTime();
          long random = new Random(ts).nextInt();
  
          String clearToken = String.format("%d:%d:%s:%s", ts, random, PASSWORD, USERNAME);
  
          byte[] hashedToken;
  
          try {
              hashedToken = MessageDigest.getInstance("MD5").digest(clearToken.getBytes());
          } catch (NoSuchAlgorithmException e) {
              throw new RuntimeException("Cannot compute token", e);
          }
  
          String formerToken = org.nuxeo.client.util.Base64.encode(hashedToken);
          String token = ENCODER.encodeToString(hashedToken);
          assertEquals(token, formerToken);
      }
test_case.class_method_signature: TestBase64.testEncode()
test_case.full_signature: @Test public void testEncode()
test_case.identifier: testEncode
test_case.invocations: getTime nextInt format digest getInstance getBytes encode encodeToString assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEncode()
focal_class.declarator: NO_OPTIONS = 0
focal_class.modifier: public final static
focal_class.original_string: public final static int NO_OPTIONS = 0;
focal_class.type: int
focal_class.var_name: NO_OPTIONS
focal_class.declarator: ENCODE = 1
focal_class.modifier: public final static
focal_class.original_string: public final static int ENCODE = 1;
focal_class.type: int
focal_class.var_name: ENCODE
focal_class.declarator: DECODE = 0
focal_class.modifier: public final static
focal_class.original_string: public final static int DECODE = 0;
focal_class.type: int
focal_class.var_name: DECODE
focal_class.declarator: GZIP = 2
focal_class.modifier: public final static
focal_class.original_string: public final static int GZIP = 2;
focal_class.type: int
focal_class.var_name: GZIP
focal_class.declarator: DONT_BREAK_LINES = 8
focal_class.modifier: public final static
focal_class.original_string: public final static int DONT_BREAK_LINES = 8;
focal_class.type: int
focal_class.var_name: DONT_BREAK_LINES
focal_class.declarator: MAX_LINE_LENGTH = 76
focal_class.modifier: private final static
focal_class.original_string: private final static int MAX_LINE_LENGTH = 76;
focal_class.type: int
focal_class.var_name: MAX_LINE_LENGTH
focal_class.declarator: EQUALS_SIGN = (byte) '='
focal_class.modifier: private final static
focal_class.original_string: private final static byte EQUALS_SIGN = (byte) '=';
focal_class.type: byte
focal_class.var_name: EQUALS_SIGN
focal_class.declarator: NEW_LINE = (byte) '\n'
focal_class.modifier: private final static
focal_class.original_string: private final static byte NEW_LINE = (byte) '\n';
focal_class.type: byte
focal_class.var_name: NEW_LINE
focal_class.declarator: PREFERRED_ENCODING = "UTF-8"
focal_class.modifier: private final static
focal_class.original_string: private final static String PREFERRED_ENCODING = "UTF-8";
focal_class.type: String
focal_class.var_name: PREFERRED_ENCODING
focal_class.declarator: ALPHABET
focal_class.modifier: private final static
focal_class.original_string: private final static byte[] ALPHABET;
focal_class.type: byte[]
focal_class.var_name: ALPHABET
focal_class.declarator: _NATIVE_ALPHABET = /* May be something funny like EBCDIC */
      { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I',
              (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R',
              (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a',
              (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j',
              (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's',
              (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1',
              (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '+',
              (byte) '/' }
focal_class.modifier: private final static
focal_class.original_string: private final static byte[] _NATIVE_ALPHABET = /* May be something funny like EBCDIC */
      { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I',
              (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R',
              (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a',
              (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j',
              (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's',
              (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1',
              (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '+',
              (byte) '/' };
focal_class.type: byte[]
focal_class.var_name: _NATIVE_ALPHABET
focal_class.declarator: DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
              -5, -5, // Whitespace: Tab and Linefeed
              -9, -9, // Decimal 11 - 12
              -5, // Whitespace: Carriage Return
              -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26
              -9, -9, -9, -9, -9, // Decimal 27 - 31
              -5, // Whitespace: Space
              -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42
              62, // Plus sign at decimal 43
              -9, -9, -9, // Decimal 44 - 46
              63, // Slash at decimal 47
              52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine
              -9, -9, -9, // Decimal 58 - 60
              -1, // Equals sign at decimal 61
              -9, -9, -9, // Decimal 62 - 64
              0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N'
              14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z'
              -9, -9, -9, -9, -9, -9, // Decimal 91 - 96
              26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm'
              39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z'
              -9, -9, -9, -9 // Decimal 123 - 126
      /*
       * ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal
       * 140 - 152 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, //
       * Decimal 166 - 178 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191
       * -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal
       * 205 - 217 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, //
       * Decimal 231 - 243 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255
       */
      }
focal_class.modifier: private final static
focal_class.original_string: private final static byte[] DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
              -5, -5, // Whitespace: Tab and Linefeed
              -9, -9, // Decimal 11 - 12
              -5, // Whitespace: Carriage Return
              -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26
              -9, -9, -9, -9, -9, // Decimal 27 - 31
              -5, // Whitespace: Space
              -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42
              62, // Plus sign at decimal 43
              -9, -9, -9, // Decimal 44 - 46
              63, // Slash at decimal 47
              52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine
              -9, -9, -9, // Decimal 58 - 60
              -1, // Equals sign at decimal 61
              -9, -9, -9, // Decimal 62 - 64
              0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N'
              14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z'
              -9, -9, -9, -9, -9, -9, // Decimal 91 - 96
              26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm'
              39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z'
              -9, -9, -9, -9 // Decimal 123 - 126
      /*
       * ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal
       * 140 - 152 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, //
       * Decimal 166 - 178 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191
       * -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal
       * 205 - 217 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, //
       * Decimal 231 - 243 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255
       */
      };
focal_class.type: byte[]
focal_class.var_name: DECODABET
focal_class.declarator: WHITE_SPACE_ENC = -5
focal_class.modifier: private final static
focal_class.original_string: private final static byte WHITE_SPACE_ENC = -5;
focal_class.type: byte
focal_class.var_name: WHITE_SPACE_ENC
focal_class.declarator: EQUALS_SIGN_ENC = -1
focal_class.modifier: private final static
focal_class.original_string: private final static byte EQUALS_SIGN_ENC = -1;
focal_class.type: byte
focal_class.var_name: EQUALS_SIGN_ENC
focal_class.file: nuxeo-java-client/src/main/java/org/nuxeo/client/util/Base64.java
focal_class.identifier: Base64
focal_class.class_method_signature: Base64.Base64()
focal_class.full_signature: private  Base64()
focal_class.identifier: Base64
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Base64()
focal_class.class_method_signature: Base64.encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes)
focal_class.full_signature: private static byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes)
focal_class.identifier: encode3to4
focal_class.modifiers: private static
focal_class.parameters: (byte[] b4, byte[] threeBytes, int numSigBytes)
focal_class.return: byte[]
focal_class.signature: byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes)
focal_class.class_method_signature: Base64.encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
focal_class.full_signature: private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
focal_class.identifier: encode3to4
focal_class.modifiers: private static
focal_class.parameters: (byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
focal_class.return: byte[]
focal_class.signature: byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
focal_class.class_method_signature: Base64.encode(byte[] bytes)
focal_class.full_signature: public static String encode(byte[] bytes)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: String
focal_class.signature: String encode(byte[] bytes)
focal_class.class_method_signature: Base64.encode(String content)
focal_class.full_signature: public static String encode(String content)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (String content)
focal_class.return: String
focal_class.signature: String encode(String content)
focal_class.class_method_signature: Base64.encode(String content, int options)
focal_class.full_signature: public static String encode(String content, int options)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (String content, int options)
focal_class.return: String
focal_class.signature: String encode(String content, int options)
focal_class.class_method_signature: Base64.encode(String content, String charset)
focal_class.full_signature: public static String encode(String content, String charset)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (String content, String charset)
focal_class.return: String
focal_class.signature: String encode(String content, String charset)
focal_class.class_method_signature: Base64.encode(String content, Charset charset)
focal_class.full_signature: public static String encode(String content, Charset charset)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (String content, Charset charset)
focal_class.return: String
focal_class.signature: String encode(String content, Charset charset)
focal_class.class_method_signature: Base64.encodeObject(java.io.Serializable serializableObject)
focal_class.full_signature: public static String encodeObject(java.io.Serializable serializableObject)
focal_class.identifier: encodeObject
focal_class.modifiers: public static
focal_class.parameters: (java.io.Serializable serializableObject)
focal_class.return: String
focal_class.signature: String encodeObject(java.io.Serializable serializableObject)
focal_class.class_method_signature: Base64.encodeObject(java.io.Serializable serializableObject, int options)
focal_class.full_signature: public static String encodeObject(java.io.Serializable serializableObject, int options)
focal_class.identifier: encodeObject
focal_class.modifiers: public static
focal_class.parameters: (java.io.Serializable serializableObject, int options)
focal_class.return: String
focal_class.signature: String encodeObject(java.io.Serializable serializableObject, int options)
focal_class.class_method_signature: Base64.encodeBytes(byte[] source)
focal_class.full_signature: public static String encodeBytes(byte[] source)
focal_class.identifier: encodeBytes
focal_class.modifiers: public static
focal_class.parameters: (byte[] source)
focal_class.return: String
focal_class.signature: String encodeBytes(byte[] source)
focal_class.class_method_signature: Base64.encodeBytes(byte[] source, int options)
focal_class.full_signature: public static String encodeBytes(byte[] source, int options)
focal_class.identifier: encodeBytes
focal_class.modifiers: public static
focal_class.parameters: (byte[] source, int options)
focal_class.return: String
focal_class.signature: String encodeBytes(byte[] source, int options)
focal_class.class_method_signature: Base64.encodeBytes(byte[] source, int off, int len)
focal_class.full_signature: public static String encodeBytes(byte[] source, int off, int len)
focal_class.identifier: encodeBytes
focal_class.modifiers: public static
focal_class.parameters: (byte[] source, int off, int len)
focal_class.return: String
focal_class.signature: String encodeBytes(byte[] source, int off, int len)
focal_class.class_method_signature: Base64.encodeBytes(byte[] source, int off, int len, int options)
focal_class.full_signature: public static String encodeBytes(byte[] source, int off, int len, int options)
focal_class.identifier: encodeBytes
focal_class.modifiers: public static
focal_class.parameters: (byte[] source, int off, int len, int options)
focal_class.return: String
focal_class.signature: String encodeBytes(byte[] source, int off, int len, int options)
focal_class.class_method_signature: Base64.decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset)
focal_class.full_signature: private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset)
focal_class.identifier: decode4to3
focal_class.modifiers: private static
focal_class.parameters: (byte[] source, int srcOffset, byte[] destination, int destOffset)
focal_class.return: int
focal_class.signature: int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset)
focal_class.class_method_signature: Base64.decode(byte[] source, int off, int len)
focal_class.full_signature: public static byte[] decode(byte[] source, int off, int len)
focal_class.identifier: decode
focal_class.modifiers: public static
focal_class.parameters: (byte[] source, int off, int len)
focal_class.return: byte[]
focal_class.signature: byte[] decode(byte[] source, int off, int len)
focal_class.class_method_signature: Base64.decode(String s)
focal_class.full_signature: public static byte[] decode(String s)
focal_class.identifier: decode
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: byte[]
focal_class.signature: byte[] decode(String s)
focal_class.class_method_signature: Base64.decodeToObject(String encodedObject)
focal_class.full_signature: public static Object decodeToObject(String encodedObject)
focal_class.identifier: decodeToObject
focal_class.modifiers: public static
focal_class.parameters: (String encodedObject)
focal_class.return: Object
focal_class.signature: Object decodeToObject(String encodedObject)
focal_class.class_method_signature: Base64.encodeToFile(byte[] dataToEncode, String filename)
focal_class.full_signature: public static boolean encodeToFile(byte[] dataToEncode, String filename)
focal_class.identifier: encodeToFile
focal_class.modifiers: public static
focal_class.parameters: (byte[] dataToEncode, String filename)
focal_class.return: boolean
focal_class.signature: boolean encodeToFile(byte[] dataToEncode, String filename)
focal_class.class_method_signature: Base64.decodeToFile(String dataToDecode, String filename)
focal_class.full_signature: public static boolean decodeToFile(String dataToDecode, String filename)
focal_class.identifier: decodeToFile
focal_class.modifiers: public static
focal_class.parameters: (String dataToDecode, String filename)
focal_class.return: boolean
focal_class.signature: boolean decodeToFile(String dataToDecode, String filename)
focal_class.class_method_signature: Base64.decodeFromFile(String filename)
focal_class.full_signature: public static byte[] decodeFromFile(String filename)
focal_class.identifier: decodeFromFile
focal_class.modifiers: public static
focal_class.parameters: (String filename)
focal_class.return: byte[]
focal_class.signature: byte[] decodeFromFile(String filename)
focal_class.class_method_signature: Base64.encodeFromFile(String filename)
focal_class.full_signature: public static String encodeFromFile(String filename)
focal_class.identifier: encodeFromFile
focal_class.modifiers: public static
focal_class.parameters: (String filename)
focal_class.return: String
focal_class.signature: String encodeFromFile(String filename)
focal_method.body: public static String encode(byte[] bytes) {
          return encodeBytes(bytes);
      }
focal_method.class_method_signature: Base64.encode(byte[] bytes)
focal_method.full_signature: public static String encode(byte[] bytes)
focal_method.identifier: encode
focal_method.invocations: encodeBytes
focal_method.modifiers: public static
focal_method.parameters: (byte[] bytes)
focal_method.return: String
focal_method.signature: String encode(byte[] bytes)