Skip to content

Instantly share code, notes, and snippets.

@il-kyun
il-kyun / ByteBufTest.java
Last active October 6, 2021 19:35
Java ByteBuffer vs Netty ByteBuf
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.Unpooled;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
public class ByteBufTest {
public static void main(String[] args) {
// 4 types of buffers
@il-kyun
il-kyun / Adder.scala
Last active February 12, 2017 14:53
[scala] test case : exam 1
class Adder {
def add(a: Int, b: Int): Int = {
a + b
}
}