Here you can find the source of macToString(String srcstr)
public static String macToString(String srcstr)
//package com.java2s; /*//from w w w.j av a 2 s . c o m * Copyright (c) 2015 Dell Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ public class Main { public static String macToString(String srcstr) { if (srcstr == null) { return "null"; } StringBuffer buf = new StringBuffer(); for (int i = 0; i < srcstr.length(); i = i + 3) { buf.append(srcstr.charAt(i)); buf.append(srcstr.charAt(i + 1)); } return buf.toString(); } }