Package io.hyperfoil.impl
Class Util
java.lang.Object
io.hyperfoil.impl.Util
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareIgnoreCase(byte b1, byte b2) static ThreadFactorydaemonThreadFactory(String prefix) static Benchmarkdeserialize(byte[] bytes) static Stringstatic booleanhasPrefix(io.netty.buffer.ByteBuf data, int offset, int length, byte[] prefix) static voidintAsText2byteBuf(int value, io.netty.buffer.ByteBuf buf) static booleanisAscii(io.netty.buffer.ByteBuf cs, int offset, int len) static booleanisLatin(CharSequence cs) static booleanisParamConvertible(Class<?> type) static longparseLong(io.netty.buffer.ByteBuf data, int offset, int length) static longparseLong(CharSequence string) static longparseLong(CharSequence string, int begin, int end) static longparseLong(CharSequence string, int begin, int end, long defaultValue) static longparseToMillis(String time) static longparseToNanos(String time) static intpow(int base, int exp) static StringprettyPrintData(double value) static StringprettyPrintNanos(long timeNanos) static StringprettyPrintNanos(long timeNanos, String width, boolean spaceBeforeUnit) Pretty prints timestatic StringprettyPrintNanosFixed(long timeNanos) Pretty prints timeNanos in 9 spacesstatic StringprettyPrintObject(Object value) static booleanregionMatches(CharSequence a, int aoffset, CharSequence b, int boffset, int length) static booleanregionMatchesIgnoreCase(CharSequence a, int aoffset, CharSequence b, int boffset, int length) static byte[]static booleanstartsWith(CharSequence sequence, int offset, CharSequence prefix) static io.netty.buffer.ByteBufstring2byteBuf(CharSequence str, io.netty.buffer.ByteBuf buffer) static io.netty.util.AsciiStringtoAsciiString(io.netty.buffer.ByteBuf buf, int offset, int length) static byte[]toByteArray(InputStream stream) static bytetoLowerCase(byte b) static StringtoString(io.netty.buffer.ByteBuf buf, int offset, int length) static StringtoString(InputStream stream) static bytetoUpperCase(byte b) static void
-
Field Details
-
COMPLETED_VOID_FUTURE
-
-
Method Details
-
compareIgnoreCase
public static boolean compareIgnoreCase(byte b1, byte b2) -
toLowerCase
public static byte toLowerCase(byte b) -
toUpperCase
public static byte toUpperCase(byte b) -
prettyPrintNanosFixed
Pretty prints timeNanos in 9 spaces- Parameters:
timeNanos- Time in nanoseconds.- Returns:
- Formatted string.
-
prettyPrintNanos
Pretty prints time- Parameters:
timeNanos- Time in nanoseconds.width- Number of characters in the number, as stringspaceBeforeUnit- Separate number and unit with a space.- Returns:
- Formatted string.
-
prettyPrintNanos
-
toString
-
isLatin
-
isAscii
public static boolean isAscii(io.netty.buffer.ByteBuf cs, int offset, int len) -
toAsciiString
public static io.netty.util.AsciiString toAsciiString(io.netty.buffer.ByteBuf buf, int offset, int length) -
string2byteBuf
public static io.netty.buffer.ByteBuf string2byteBuf(CharSequence str, io.netty.buffer.ByteBuf buffer) -
explainCauses
-
regionMatchesIgnoreCase
public static boolean regionMatchesIgnoreCase(CharSequence a, int aoffset, CharSequence b, int boffset, int length) -
regionMatches
public static boolean regionMatches(CharSequence a, int aoffset, CharSequence b, int boffset, int length) -
startsWith
-
pow
public static int pow(int base, int exp) -
parseLong
public static long parseLong(io.netty.buffer.ByteBuf data, int offset, int length) -
isParamConvertible
-
prettyPrintObject
-
hasPrefix
public static boolean hasPrefix(io.netty.buffer.ByteBuf data, int offset, int length, byte[] prefix) -
serialize
- Throws:
IOException
-
deserialize
- Throws:
IOExceptionClassNotFoundException
-
toByteArray
- Throws:
IOException
-
toString
- Throws:
IOException
-
parseLong
-
parseLong
-
parseLong
-
parseToNanos
-
parseToMillis
-
daemonThreadFactory
-
urlEncode
-
prettyPrintData
-
intAsText2byteBuf
public static void intAsText2byteBuf(int value, io.netty.buffer.ByteBuf buf)
-