Java XML Data Type Converter getLong(byte[] data)

Here you can find the source of getLong(byte[] data)

Description

get Long

License

Open Source License

Declaration

private static long getLong(byte[] data) 

Method Source Code

//package com.java2s;

import javax.xml.bind.DatatypeConverter;

public class Main {
    private static long getLong(byte[] data) {
        if (data != null) {
            try {

                String dataTypeS = DatatypeConverter.printHexBinary(data);
                long dataType_num = Long.parseLong(dataTypeS, 16);
                return dataType_num;
            } catch (IllegalArgumentException e) {
                e.printStackTrace();//from w w w . ja  va  2  s. co m
            }
        }
        return 0;
    }
}

Related

  1. generateSalt(int clientNonceByteCount)
  2. getByteList(String nomal, boolean isDecode)
  3. getByteListStr(List byteList, boolean isEncode)
  4. getDataUrlForBytes(final byte[] bytes)
  5. getImgurContent(String clientID, byte[] image)
  6. getText(URL url, String user, String password)
  7. getTextAsJavaByteArrayInitializer( String text, String charsetName, int maxArraySize)
  8. getXMLLong(final long value)
  9. isValidValue(String value, Class type)