com.launchdarkly.eventsource.Helpers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of okhttp-eventsource Show documentation
Show all versions of okhttp-eventsource Show documentation
EventSource Implementation built on OkHttp
package com.launchdarkly.eventsource;
import java.nio.charset.Charset;
abstract class Helpers {
static final Charset UTF8 = Charset.forName("UTF-8"); // SSE streams must be UTF-8, per the spec
private Helpers() {}
// Returns 2**k, or Integer.MAX_VALUE if 2**k would overflow
static int pow2(int k) {
return (k < Integer.SIZE - 1) ? (1 << k) : Integer.MAX_VALUE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy