Java Endian Swap swapEndianHexString(String in)

Here you can find the source of swapEndianHexString(String in)

Description

swap Endian Hex String

License

Open Source License

Declaration

public static String swapEndianHexString(String in) 

Method Source Code

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

public class Main {
    public static String swapEndianHexString(String in) {
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < in.length(); i += 2) {
            String s = in.substring(i, i + 2);
            sb.insert(0, s);//from  w  ww. j ava2  s.  co  m
        }
        return sb.toString();
    }
}

Related

  1. swapEndian(final int i)
  2. swapEndian2Bytes(short sEndian)
  3. swapEndianness(int i)