Java Hex Convert To fromHex(final String hexValue)

Here you can find the source of fromHex(final String hexValue)

Description

from Hex

License

Open Source License

Declaration

public static int fromHex(final String hexValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static final String OPAQUE = "FF";

    public static int fromHex(final String hexValue) {
        // hexValue is interpreted as AARRGGBB
        return (int) Long.parseLong(hexValue, 16);
    }// w  w  w.jav  a  2s.  c o  m

    public static int fromHex(final String red, final String green, final String blue) {
        return fromHex(OPAQUE, red, green, blue);
    }

    public static int fromHex(final String alpha, final String red, final String green, final String blue) {
        return fromHex(alpha + red + green + blue);
    }
}

Related

  1. fromHex(char hi, char lo)
  2. fromHex(CharSequence cs)
  3. fromHex(final CharSequence s)
  4. fromHex(final String hex)
  5. fromHex(final String hex)
  6. fromHex(final String s)
  7. fromHex(final String string, final int offset, final int count)
  8. fromHex(String bytesString)
  9. fromHex(String encoded)