Here you can find the source of writeEmpty()
private static byte[] writeEmpty()
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public final static int EMPTY_CLIPBOARD = 0; private static byte[] writeEmpty() { return ByteBuffer.allocate(4).putInt(EMPTY_CLIPBOARD).array(); }/* w w w . j av a2 s. c o m*/ }