Skip to content

Instantly share code, notes, and snippets.

View frankbenoit's full-sized avatar

Frank Benoit frankbenoit

  • Germany, Stuttgart
View GitHub Profile
class StringUtils {
public String ensureNonNull( @Nullable String str )
public static boolean hasContent(@Nullable String str)
public static String toString(@Nullable Object o) {
public static String hasContentOrElse(String str, String elseValue )
public static String hasContentOrCompute(String str, Supplier<String> elseValue )
public static boolean equalsIgnoreCase(@Nullable String str1, @Nullable String str2)
public static boolean startsWith(@Nullable String string, String prefix)
// ...
}
package nbt;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
class Sender extends Thread {
public static void main(String[] args) throws Exception {