congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Base32Codec
Code IndexAdd Tabnine to your IDE (free)

How to use
Base32Codec
in
com.amazonaws.util

Best Java code snippets using com.amazonaws.util.Base32Codec (Showing top 20 results out of 315)

origin: aws/aws-sdk-java

Base32Codec() {
  super(alphabets());
}

origin: aws/aws-sdk-java

  /** 
   * Decodes the given base 32 encoded bytes.
   */
  public static byte[] decode(byte[] b32) { return b32 == null || b32.length == 0 ? b32 :  codec.decode(b32, b32.length); }
}
origin: aws/aws-sdk-java

/**
 * Returns a 32 encoded byte array of the given bytes.
 */
public static byte[] encode(byte[] bytes) { return bytes == null || bytes.length == 0 ? bytes : codec.encode(bytes); }

origin: aws/aws-sdk-java

/**
 * Returns a base 32 encoded string of the given bytes.
 */
public static String encodeAsString(byte ... bytes) {
  if (bytes == null)
    return null;
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes)); 
}

origin: aws/aws-sdk-java

/** 
 * Decodes the given base 32 encoded string,
 * skipping carriage returns, line feeds and spaces as needed.
 */
public static byte[] decode(String b32) {
  if (b32 == null)
    return null;
  if (b32.length() == 0)
    return new byte[0];
  byte[] buf = new byte[b32.length()];
  int len = CodecUtils.sanitize(b32, buf);
  return codec.decode(buf, len);
}

origin: com.amazonaws/aws-java-sdk-core

Base32Codec() {
  super(alphabets());
}

origin: aws-amplify/aws-sdk-android

/**
 * @param bytes the bytes.
 * @return a 32 encoded byte array of the given bytes. hchar: compared to
 * Base32.encode(byte[]) of JakartaCommons-1.5, this routine is > 20x faster
 * on my MacAir.
 */
public static byte[] encode(byte[] bytes) {
  return bytes == null || bytes.length == 0 ? bytes : CODEC.encode(bytes);
}
origin: com.amazonaws/aws-java-sdk-core

  /** 
   * Decodes the given base 32 encoded bytes.
   */
  public static byte[] decode(byte[] b32) { return b32 == null || b32.length == 0 ? b32 :  codec.decode(b32, b32.length); }
}
origin: aws-amplify/aws-sdk-android

Base32Codec() {
  super(alphabets());
}
origin: com.amazonaws/aws-java-sdk-core

/**
 * Returns a 32 encoded byte array of the given bytes.
 */
public static byte[] encode(byte[] bytes) { return bytes == null || bytes.length == 0 ? bytes : codec.encode(bytes); }

origin: aws-amplify/aws-sdk-android

  /**
   * Decodes the given base 32 encoded bytes.
   * @param b32 the base 32 encoded bytes.
   * @return the decoded result.
   */
  public static byte[] decode(byte[] b32) {
    return b32 == null || b32.length == 0 ? b32 : CODEC.decode(b32, b32.length);
  }
}
origin: com.gluonhq/aws-java-sdk-core

Base32Codec() {
  super(alphabets());
}
origin: com.amazonaws/aws-java-sdk-core

/**
 * Returns a base 32 encoded string of the given bytes.
 */
public static String encodeAsString(byte ... bytes) {
  if (bytes == null)
    return null;
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes)); 
}

origin: com.amazonaws/aws-java-sdk-core

/** 
 * Decodes the given base 32 encoded string,
 * skipping carriage returns, line feeds and spaces as needed.
 */
public static byte[] decode(String b32) {
  if (b32 == null)
    return null;
  if (b32.length() == 0)
    return new byte[0];
  byte[] buf = new byte[b32.length()];
  int len = CodecUtils.sanitize(b32, buf);
  return codec.decode(buf, len);
}

origin: Nextdoor/bender

Base32Codec() {
  super(alphabets());
}

origin: aws-amplify/aws-sdk-android

/**
 * @param bytes the bytes.
 * @return a base 32 encoded string of the given bytes.
 */
public static String encodeAsString(byte... bytes) {
  if (bytes == null) {
    return null;
  }
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(CODEC.encode(bytes));
}
origin: aws-amplify/aws-sdk-android

/**
 * Decodes the given base 32 encoded string, skipping carriage returns, line
 * feeds and spaces as needed. hchar: compared to Base32.decode(String) of
 * JakartaCommons-1.5, this routine is > 11x faster on my MacAir.
 * @param b32 the base 32 encoded string.
 * @return the decoded result.
 */
public static byte[] decode(String b32) {
  if (b32 == null) {
    return null;
  }
  if (b32.length() == 0) {
    return new byte[0];
  }
  byte[] buf = new byte[b32.length()];
  int len = CodecUtils.sanitize(b32, buf);
  return CODEC.decode(buf, len);
}
origin: com.amazonaws/aws-android-sdk-core

Base32Codec() {
  super(alphabets());
}
origin: com.gluonhq/aws-java-sdk-core

/**
 * @param bytes the bytes.
 * @return a 32 encoded byte array of the given bytes. hchar: compared to
 * Base32.encode(byte[]) of JakartaCommons-1.5, this routine is > 20x faster
 * on my MacAir.
 */
public static byte[] encode(byte[] bytes) {
  return bytes == null || bytes.length == 0 ? bytes : CODEC.encode(bytes);
}
origin: com.gluonhq/aws-java-sdk-core

  /**
   * Decodes the given base 32 encoded bytes.
   * @param b32 the base 32 encoded bytes.
   * @return the decoded result.
   */
  public static byte[] decode(byte[] b32) {
    return b32 == null || b32.length == 0 ? b32 : CODEC.decode(b32, b32.length);
  }
}
com.amazonaws.utilBase32Codec

Javadoc

A Base 32 codec implementation.

Most used methods

  • alphabets
  • decode
  • encode

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now