Decode the byte array.

@param aEncodedBytes
The encoded byte array.
@param nOptions
Decoding options.
@return <code>null</code> if decoding failed.
518317
@Nullable
  @ReturnsMutableCopy
  public static byte [] safeDecode (@Nullable final byte [] aEncodedBytes, final int nOptions)
  {
    if (aEncodedBytes != null)
      return safeDecode (aEncodedBytes, 0, aEncodedBytes.length, nOptions);
    return null;
  }
1300568
public static byte[] decodeString(String encoded) {
        return encoded == null ? null : Base64.getDecoder().decode(encoded);
    }
946016
@Nullable protected byte[] decode(@Nullable String data) {
    return data == null ? null : Base64.getUrlDecoder().decode(data);
  }
1070194
public int decode(byte[] b) throws ParameterException {
        if (b == null || b.length != 1) {
            throw new ParameterException("byte[] must  not be null and length must  be 1");
        }

        this.transimissionMediumRequirement = b[0];

        return 1;
    }
1372262
public static byte[] decode(String s) {
		byte[] bytes;
		try {
			bytes = s.getBytes(PREFERRED_ENCODING);
		} // end try
		catch (java.io.UnsupportedEncodingException uee) {
			bytes = s.getBytes();
		} // end catch

		// Decode
		bytes = decode(bytes);

		return bytes;
	}
298674
public Nist decode(InputStream inputStream) {
        try (BufferedInputStream input = new BufferedInputStream(inputStream);
             ByteArrayOutputStream output = new ByteArrayOutputStream()) {

            byte[] data = new byte[16384];
            int nRead;
            while ((nRead = input.read(data, 0, data.length)) != -1) {
                output.write(data, 0, nRead);
            }
            output.flush();

            return decode(output.toByteArray());
        } catch (IOException e) {
            throw new RuntimeException("unexpected error.", e);
        }
    }
1359663
@GwtIncompatible("ByteSource,CharSource")
  public final ByteSource decodingSource(final CharSource encodedSource) {
    checkNotNull(encodedSource);
    return new ByteSource() {
      @Override
      public InputStream openStream() throws IOException {
        return decodingStream(encodedSource.openStream());
      }
    };
  }
516803
public void encodeData(AsnOutputStream asnOs) throws MAPException {

        if (this.imsi == null && this.msisdn == null)
            throw new MAPException("Error while encoding " + _PrimitiveName + ": all choices must not be null");
        if (this.imsi != null && this.msisdn != null)
            throw new MAPException("Error while encoding " + _PrimitiveName + ": all choices must not be not null");

        if (this.imsi != null) {
            ((IMSIImpl) this.imsi).encodeData(asnOs);
        } else {
            ((ISDNAddressStringImpl) this.msisdn).encodeData(asnOs);
        }
    }
212024
public static Optional<boolean[]> decodeNullBits(SliceInput sliceInput, int positionCount)
    {
        if (!sliceInput.readBoolean()) {
            return Optional.empty();
        }

        // read null bits 8 at a time
        boolean[] valueIsNull = new boolean[positionCount];
        for (int position = 0; position < (positionCount & ~0b111); position += 8) {
            byte value = sliceInput.readByte();
            valueIsNull[position] = ((value & 0b1000_0000) != 0);
            valueIsNull[position + 1] = ((value & 0b0100_0000) != 0);
            valueIsNull[position + 2] = ((value & 0b0010_0000) != 0);
            valueIsNull[position + 3] = ((value & 0b0001_0000) != 0);
            valueIsNull[position + 4] = ((value & 0b0000_1000) != 0);
            valueIsNull[position + 5] = ((value & 0b0000_0100) != 0);
            valueIsNull[position + 6] = ((value & 0b0000_0010) != 0);
            valueIsNull[position + 7] = ((value & 0b0000_0001) != 0);
        }

        // read last null bits
        if ((positionCount & 0b111) > 0) {
            byte value = sliceInput.readByte();
            int mask = 0b1000_0000;
            for (int position = positionCount & ~0b111; position < positionCount; position++) {
                valueIsNull[position] = ((value & mask) != 0);
                mask >>>= 1;
            }
        }

        return Optional.of(valueIsNull);
    }
901170
private static void decodeAnsiX12Segment(BitSource bits,
                                           StringBuilder result) throws FormatException {
    // Three ANSI X12 values are encoded in a 16-bit value as
    // (1600 * C1) + (40 * C2) + C3 + 1

    int[] cValues = new int[3];
    do {
      // If there is only one byte left then it will be encoded as ASCII
      if (bits.available() == 8) {
        return;
      }
      int firstByte = bits.readBits(8);
      if (firstByte == 254) {  // Unlatch codeword
        return;
      }

      parseTwoBytes(firstByte, bits.readBits(8), cValues);

      for (int i = 0; i < 3; i++) {
        int cValue = cValues[i];
        switch (cValue) {
          case 0: // X12 segment terminator <CR>
            result.append('\r');
            break;
          case 1: // X12 segment separator *
            result.append('*');
            break;
          case 2: // X12 sub-element separator >
            result.append('>');
            break;
          case 3: // space
            result.append(' ');
            break;
          default:
            if (cValue < 14) {  // 0 - 9
              result.append((char) (cValue + 44));
            } else if (cValue < 40) {  // A - Z
              result.append((char) (cValue + 51));
            } else {
              throw FormatException.getFormatInstance();
            }
            break;
        }
      }
    } while (bits.available() > 0);
  }
309781
public static Pair<String, String> decodeDelegationKey(String encodedValue) {
		List<String> split = Strings.split(encodedValue, DEFAULT_SEVERITY_SEPARATOR);
		if (split.size() == 2) {
			return Tuples.create(split.get(0), split.get(1));
		} else if (split.size() == 1) {
			return Tuples.create(split.get(0), SeverityConverter.SEVERITY_WARNING);
		} else {
			return null;
		}
	}
679376
public static byte[] decode(String s) {

        if( s == null ){
            throw new IllegalArgumentException("Input string was null.");
        }

        byte[] inBytes;
        try {
            inBytes = s.getBytes("US-ASCII");
        }
        catch( java.io.UnsupportedEncodingException uee ) {
            inBytes = s.getBytes();
        }

        if( inBytes.length == 0 ) {
            return new byte[0];
        } else if( inBytes.length < 4 ){
            throw new IllegalArgumentException(
                    "Base64-encoded string must have at least four characters, but length specified was " + inBytes.length);
        }   // end if

        return decodeBytes(inBytes);
    }
657982
function DBCSDecoder(options, codec) {
    // Decoder state
    this.nodeIdx = 0;
    this.prevBuf = Buffer.alloc(0);

    // Static data
    this.decodeTables = codec.decodeTables;
    this.decodeTableSeq = codec.decodeTableSeq;
    this.defaultCharUnicode = codec.defaultCharUnicode;
    this.gb18030 = codec.gb18030;
}
86620
public void decode(byte data[], OutputStream uncompData) {
        
        if(data[0] == (byte)0x00 && data[1] == (byte)0x01) {
            throw new RuntimeException("LZW flavour not supported.");
        }
        
        initializeStringTable();
        
        this.data = data;
        this.uncompData = uncompData;
        
        // Initialize pointers
        bytePointer = 0;
        bitPointer = 0;
        
        nextData = 0;
        nextBits = 0;
        
        int code, oldCode = 0;
        byte string[];
        
        while ((code = getNextCode()) != 257) {
            
            if (code == 256) {
                
                initializeStringTable();
                code = getNextCode();
                
                if (code == 257) {
                    break;
                }
                
                writeString(stringTable[code]);
                oldCode = code;
                
            } else {
                
                if (code < tableIndex) {
                    
                    string = stringTable[code];
                    
                    writeString(string);
                    addStringToTable(stringTable[oldCode], string[0]);
                    oldCode = code;
                    
                } else {
                    
                    string = stringTable[oldCode];
                    string = composeString(string, string[0]);
                    writeString(string);
                    addStringToTable(string);
                    oldCode = code;
                }
            }
        }
    }
1338130
private static int decodeNibbles(final char c1, final char c2) {
    final int n1 = decodeHex(c1);
    if (n1 == INVALID) {
      return INVALID;
    }
    final int n2 = decodeHex(c2);
    if (n2 == INVALID) {
      return INVALID;
    }
    return (((n1 & 0xf) << 4) | (n2 & 0xf));
  }
13248
public int decode(byte[] b) throws ParameterException {
        if (b == null || b.length != 1) {
            throw new ParameterException("byte[] must  not be null and length must  be 1");
        }

        this.transimissionMediumUsed = b[0];

        return 1;
    }
306481
private static byte[] decode(String s, int options)
	{
		byte[] bytes;
		try
		{
			bytes = s.getBytes(PREFERRED_ENCODING);
		}
		catch (java.io.UnsupportedEncodingException uee)
		{
			bytes = s.getBytes(); // Uses native encoding
			// CHECKME: Is this correct? I think it should be a warning instead of an error since nothing
			// is re-thrown. I do think that *some* sort of logging is in order here especially since UTF-8 should
			// always be available on all platforms. If it's not, then all bets are off on your runtime env. - Kevin Wall
		}

		// Decode
		bytes = decode(bytes, 0, bytes.length, options);

		// Check to see if it's gzip-compressed
		// GZIP Magic Two-Byte Number: 0x8b1f (35615)
		if (bytes != null && bytes.length >= 4)
		{

			int head = ((int) bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
			if (java.util.zip.GZIPInputStream.GZIP_MAGIC == head)
			{
				java.io.ByteArrayInputStream bais = null;
				java.util.zip.GZIPInputStream gzis = null;
				java.io.ByteArrayOutputStream baos = null;
				byte[] buffer = new byte[2048];
				int length = 0;

				try
				{
					baos = new java.io.ByteArrayOutputStream();
					bais = new java.io.ByteArrayInputStream(bytes);
					gzis = new java.util.zip.GZIPInputStream(bais);

					while ((length = gzis.read(buffer)) >= 0)
					{
						baos.write(buffer, 0, length);
					} // end while: reading input

					// No error? Get new bytes.
					bytes = baos.toByteArray();

				} // end try
				catch (java.io.IOException e)
				{
					// Just return originally-decoded bytes
				} // end catch
				finally
				{
					try
					{
						baos.close();
					}
					catch (Exception e)
					{
					}
					try
					{
						gzis.close();
					}
					catch (Exception e)
					{
					}
					try
					{
						bais.close();
					}
					catch (Exception e)
					{
					}
				} // end finally

			} // end if: gzipped
		} // end if: bytes.length >= 2

		return bytes;
	}