Method used to extract application label

@param pData
raw response data

@return decoded application label or null
971685
protected String extractApplicationLabel(final byte[] pData) {
		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Extract Application label");
		}
		String label = null;
		// Get Preferred name first
		byte[] labelByte = TlvUtil.getValue(pData, EmvTags.APPLICATION_PREFERRED_NAME);
		// Get Application label
		if (labelByte == null) {
			labelByte = TlvUtil.getValue(pData, EmvTags.APPLICATION_LABEL);
		}
		// Convert to String
		if (labelByte != null) {
			label = new String(labelByte);
		}
		return label;
	}
194341
@Nullable
  @CheckForNull
  public String getLabel() {
    String label = getString(LABEL);
    return label != null ? label : getName();
  }
945883
protected String processLabel(String label, String name) {
    if (null != label) {
      if (Strings.isEmpty(label)) return null;
      else return getText(label);
    } else return getText(name);
  }
92423
public static String encode(byte[] pData) {
        int offset = 0;
        int len;
        StringBuilder buf = new StringBuilder();

        while ((pData.length - offset) > 0) {
            byte a, b, c;
            if ((pData.length - offset) > 2) {
                len = 3;
            }
            else {
                len = pData.length - offset;
            }

            switch (len) {
                case 1:
                    a = pData[offset];
                    b = 0;
                    buf.append(PEM_ARRAY[(a >>> 2) & 0x3F]);
                    buf.append(PEM_ARRAY[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
                    buf.append('=');
                    buf.append('=');
                    offset++;
                    break;
                case 2:
                    a = pData[offset];
                    b = pData[offset + 1];
                    c = 0;
                    buf.append(PEM_ARRAY[(a >>> 2) & 0x3F]);
                    buf.append(PEM_ARRAY[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
                    buf.append(PEM_ARRAY[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
                    buf.append('=');
                    offset += offset + 2; // ???
                    break;
                default:
                    a = pData[offset];
                    b = pData[offset + 1];
                    c = pData[offset + 2];
                    buf.append(PEM_ARRAY[(a >>> 2) & 0x3F]);
                    buf.append(PEM_ARRAY[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
                    buf.append(PEM_ARRAY[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
                    buf.append(PEM_ARRAY[c & 0x3F]);
                    offset = offset + 3;
                    break;
            }

        }
        return buf.toString();
    }
975113
public static String extractToString(final DeviceData deviceDataArgout) throws DevFailed {
	final Object[] values = CommandHelper.extractArray(deviceDataArgout);
	Object value = null;
	String argout = "";
	if (values.length == 1) {
	    value = values[0];
	    if (value instanceof DevState) {
		argout = StateUtilities.getNameForState((DevState) value);
	    } else if (value instanceof DevVarLongStringArray) {
		final int[] intValues = ((DevVarLongStringArray) value).lvalue;
		final String[] stringValues = ((DevVarLongStringArray) value).svalue;
		for (int i = 0; i < stringValues.length; i++) {
		    argout = argout + "DevVarLongStringArray[" + i + "]=(" + intValues[i] + ","
			    + stringValues[i] + ")\n";
		}
	    } else if (value instanceof DevVarDoubleStringArray) {
		final double[] doubleValues = ((DevVarDoubleStringArray) value).dvalue;
		final String[] stringValues = ((DevVarDoubleStringArray) value).svalue;
		for (int i = 0; i < stringValues.length; i++) {
		    argout = argout + "DevVarDoubleStringArray[" + i + "]=(" + doubleValues[i]
			    + "," + stringValues[i] + ")\n";
		}
	    } else {
		argout = value.toString();
	    }
	} else if (values.length > 1) {
	    for (int i = 0; i < values.length; i++) {
		if (values[i] instanceof DevState) {
		    argout = argout + values[i].getClass().getSimpleName() + "[" + i + "]="
			    + StateUtilities.getNameForState((DevState) values[i]) + "\n";
		} else {
		    argout = argout + values[i].getClass().getSimpleName() + "[" + i + "]="
			    + values[i].toString() + "\n";
		}
	    }
	} else {
	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value.getClass()
		    + " not supported",
		    "CommandHelper.extractToString(Object value,deviceDataArgin)");
	}

	return argout;
    }
767382
public static byte[] encode( byte[] dData )
    {
        if( dData == null )
        {
            throw new IllegalArgumentException( "Cannot encode null" );
        }
        byte[] eData = new byte[( ( dData.length + 2 ) / 3 ) * 4];

        int eIndex = 0;
        for( int i = 0; i < dData.length; i += 3 )
        {
            int d1;
            int d2 = 0;
            int d3 = 0;
            int e1;
            int e2;
            int e3;
            int e4;
            int pad = 0;

            d1 = dData[ i ];
            if( ( i + 1 ) < dData.length )
            {
                d2 = dData[ i + 1 ];
                if( ( i + 2 ) < dData.length )
                {
                    d3 = dData[ i + 2 ];
                }
                else
                {
                    pad = 1;
                }
            }
            else
            {
                pad = 2;
            }

            e1 = ALPHASET[ ( d1 & I6O2 ) >> 2 ];
            e2 = ALPHASET[ ( d1 & O6I2 ) << 4 | ( d2 & I4O4 ) >> 4 ];
            e3 = ALPHASET[ ( d2 & O4I4 ) << 2 | ( d3 & I2O6 ) >> 6 ];
            e4 = ALPHASET[ ( d3 & O2I6 ) ];

            eData[ eIndex++ ] = (byte) e1;
            eData[ eIndex++ ] = (byte) e2;
            eData[ eIndex++ ] = ( pad < 2 ) ? (byte) e3 : (byte) '=';
            eData[ eIndex++ ] = ( pad < 1 ) ? (byte) e4 : (byte) '=';

        }
        return eData;
    }
9445
public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata
      getTextEntityExtractionDetails() {
    if (detailsCase_ == 13) {
      return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata
        .getDefaultInstance();
  }
24308
@Nullable
  @CheckForNull
  public String getLabel(String languageCode) {
    String i18nString = getString(getI18nAttributeName(LABEL, languageCode));
    return i18nString != null ? i18nString : getLabel();
  }
1078156
public static byte[] fromString(final String pData) {
		if (pData == null) {
			throw new IllegalArgumentException("Argument can't be null");
		}
		StringBuilder sb = new StringBuilder(pData);
		int j = 0;
		for (int i = 0; i < sb.length(); i++) {
			if (!Character.isWhitespace(sb.charAt(i))) {
				sb.setCharAt(j++, sb.charAt(i));
			}
		}
		sb.delete(j, sb.length());
		if (sb.length() % 2 != 0) {
			throw new IllegalArgumentException("Hex binary needs to be even-length :" + pData);
		}
		byte[] result = new byte[sb.length() / 2];
		j = 0;
		for (int i = 0; i < sb.length(); i += 2) {
			result[j++] = (byte) ((Character.digit(sb.charAt(i), 16) << 4) + Character.digit(sb.charAt(i + 1), 16));
		}
		return result;
	}
880305
private String getPayLoad(Key key, Application app) {
        if (app == null) {
            return EMPTY_PAYLOAD;
        }

        EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept());
        try {
            return encoderWrapper.encode(app);
        } catch (Exception e) {
            logger.error("Failed to encode the payload for application {}", app.getName(), e);
            return "";
        }
    }
87288
@Override
  public final String toDateString(final Date pDate,
    final Map<String, Object> pAddParam) throws Exception {
    return this.dateFormat.format(pDate);
  }
120137
public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadataOrBuilder
      getTextEntityExtractionDetailsOrBuilder() {
    if (detailsCase_ == 13) {
      return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata
        .getDefaultInstance();
  }
842580
public @Nullable LabelAtom getLabelAtom(@CheckForNull String name) {
        if (name==null)  return null;

        while(true) {
            Label l = labels.get(name);
            if(l!=null)
                return (LabelAtom)l;

            // non-existent
            LabelAtom la = new LabelAtom(name);
            if (labels.putIfAbsent(name, la)==null)
                la.load();
        }
    }
582411
@Override
    public java.util.List<DataSlice> getData() throws PersistentDataEncodingException, SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getData");

        java.util.List<DataSlice> retval = null;

        synchronized (this)
        {
            if (_link != null)
            {
                retval = _link.getMemberData();
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getData", "return=" + retval);
        return retval;
    }
599153
public Object decode(CachedData d) {
    byte[] data = d.getData();
    Object rv = null;
    if ((d.getFlags() & COMPRESSED) != 0) {
      data = decompress(d.getData());
    }
    int flags = d.getFlags() & SPECIAL_MASK;
    if ((d.getFlags() & SERIALIZED) != 0 && data != null) {
      rv = deserialize(data);
    } else if (flags != 0 && data != null) {
      switch (flags) {
      case SPECIAL_BOOLEAN:
        rv = Boolean.valueOf(tu.decodeBoolean(data));
        break;
      case SPECIAL_INT:
        rv = Integer.valueOf(tu.decodeInt(data));
        break;
      case SPECIAL_LONG:
        rv = Long.valueOf(tu.decodeLong(data));
        break;
      case SPECIAL_DATE:
        rv = new Date(tu.decodeLong(data));
        break;
      case SPECIAL_BYTE:
        rv = Byte.valueOf(tu.decodeByte(data));
        break;
      case SPECIAL_FLOAT:
        rv = new Float(Float.intBitsToFloat(tu.decodeInt(data)));
        break;
      case SPECIAL_DOUBLE:
        rv = new Double(Double.longBitsToDouble(tu.decodeLong(data)));
        break;
      case SPECIAL_BYTEARRAY:
        rv = data;
        break;
      default:
        getLogger().warn("Undecodeable with flags %x", flags);
      }
    } else {
      rv = decodeString(data);
    }
    return rv;
  }
1093763
public LabelCache labels(long applicationId)
    {
        LabelCache cache = labels.get(applicationId);
        if(cache == null)
            labels.put(applicationId, cache = new LabelCache(applicationId));
        return cache;
    }
680447
@Override
	public String getLabel() {
		ResourceStore rs;
		ResourceRef rr;
		synchronized(lock) {
			rs = this.resourceStore;
			rr = this.resourceRef;
		}
		if(rr != null) {
			String path = rr.getPath().toString();
			boolean isDirectory = path.endsWith(Path.SEPARATOR_STRING);
			int slashBefore;
			if(isDirectory) {
				slashBefore = path.lastIndexOf(Path.SEPARATOR_CHAR, path.length() - 2);
			} else {
				slashBefore = path.lastIndexOf(Path.SEPARATOR_CHAR);
			}
			String filename = path.substring(slashBefore + 1);
			if(filename.isEmpty()) throw new IllegalArgumentException("Invalid filename for file: " + path);
			if(!isDirectory) {
				if(rs != null) {
					try {
						try (ResourceConnection conn = rs.getResource(rr.getPath()).open()) {
							if(conn.exists()) {
								return
									filename
									+ " ("
									+ StringUtility.getApproximateSize(conn.getLength())
									+ ')'
								;
							}
						}
					} catch(FileNotFoundException e) {
						// Resource removed between calls to exists() and getLength()
						// fall-through to return filename
					} catch(IOException e) {
						throw new WrappedException(e);
					}
				}
			}
			return filename;
		}
		throw new IllegalStateException("Path not set");
	}