java.lang.Object
com.github.mizosoft.methanol.internal.Utils
Miscellaneous utilities.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffer
copy
(ByteBuffer buffer) static int
copyRemaining
(ByteBuffer src, ByteBuffer dst) static String
From RFC 7230 section 3.2.6:static String
forwardingObjectToString
(Object forwardingObject, Object delegate) static <T> T
static Throwable
static <T> T
static BodyAdapter.Hints
static boolean
isValidHeaderName
(String name) static boolean
isValidToken
(CharSequence token) static long
remaining
(ByteBuffer[] buffers) static long
remaining
(List<ByteBuffer> buffers) static Duration
requireNonNegativeDuration
(Duration duration) static Duration
requirePositiveDuration
(Duration duration) static void
requireValidHeader
(String name, String value) static String
requireValidHeaderName
(String name) static String
requireValidHeaderValue
(String value) static <S extends CharSequence>
SrequireValidToken
(S token) static boolean
startsWithIgnoreCase
(String source, String prefix) static Clock
static CompletionException
static InterruptedIOException
static String
toStringIdentityPrefix
(Object object)
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZE
-
-
Method Details
-
isValidToken
-
isValidHeaderName
-
requireValidToken
-
requireValidHeaderName
-
requireValidHeaderValue
-
requireValidHeader
-
requirePositiveDuration
-
requireNonNegativeDuration
-
copyRemaining
-
copy
-
systemMillisUtc
-
getDeepCompletionCause
-
get
- Throws:
IOException
InterruptedException
-
getIo
- Throws:
IOException
-
escapeAndQuoteValueIfNeeded
From RFC 7230 section 3.2.6:"A sender SHOULD NOT generate a quoted-pair in a quoted-string except where necessary to quote DQUOTE and backslash octets occurring within that string."
-
startsWithIgnoreCase
-
toCompletionException
-
toInterruptedIOException
-
remaining
-
remaining
-
hintsOf
-
toStringIdentityPrefix
-
forwardingObjectToString
-