public class IppUtil extends Object
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program 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 this
program; if not, see
| Constructor and Description |
|---|
IppUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
concatenateBytebuffers(ArrayList<ByteBuffer> buffers)
concatenate nio-ByteBuffers
|
static String |
getTranslatedString(String str) |
static String |
getTranslatedString(String str,
String charsetName) |
static boolean |
isAlive(String ipAddress) |
static String |
toBoolean(byte b)
See RFC2910, http://www.ietf.org/rfc/rfc2910 IPP boolean is defined as
SIGNED-BYTE where 0x00 is 'false' and 0x01 is 'true'
|
static byte[] |
toBytes(String str)
Encode in default encoding ('utf-8')
|
static byte[] |
toBytes(String str,
String encoding) |
static String |
toHex(byte b) |
static String |
toHexWithMarker(byte b) |
static short |
toShort(byte a,
byte b) |
public static short toShort(byte a,
byte b)
a - high byteb - low bytepublic static String toHex(byte b)
b - bytepublic static String toHexWithMarker(byte b)
b - bytepublic static byte[] toBytes(String str, String encoding) throws UnsupportedEncodingException
str - String to encodeencoding - UnsupportedEncodingExceptionpublic static byte[] toBytes(String str) throws UnsupportedEncodingException
UnsupportedEncodingExceptiontoBytes(str,null)public static String toBoolean(byte b)
b - bytepublic static boolean isAlive(String ipAddress) throws IOException
ipAddress - IOExceptionpublic static String getTranslatedString(String str) throws CharacterCodingException
str - CharacterCodingExceptionpublic static String getTranslatedString(String str, String charsetName) throws CharacterCodingException
str - charsetName - CharacterCodingExceptionpublic static ByteBuffer concatenateBytebuffers(ArrayList<ByteBuffer> buffers)
buffers - ArrayListCopyright © 2016. All rights reserved.