Here you can find the source of formatAsRawHex(int bitStringLength, String hex)
Parameter | Description |
---|---|
bitStringLength | the length of the bit-string (binary representation). |
hex | the hex representation of the tag. |
public static String formatAsRawHex(int bitStringLength, String hex)
//package com.java2s; /*//from w ww . ja v a2 s . c om * Copyright (C) 2007 ETH Zurich * * This file is part of Fosstrak (www.fosstrak.org). * * Fosstrak is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * Fosstrak is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with Fosstrak; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA */ public class Main { /** * creates a epc-hex representation of a given tag. * @param bitStringLength the length of the bit-string (binary representation). * @param hex the hex representation of the tag. * @return the formatted epc-hex representation. */ public static String formatAsRawHex(int bitStringLength, String hex) { return String.format("urn:epc:raw:%d.x%s", bitStringLength, hex); } }