import java.nio.*;
import java.nio.LongBuffer;

public class CompareBuffer {
	public static void main(String[] args) throws Exception {
		long[] array = new long[] { 232231321, 37656566, 454356544 };
		LongBuffer LongBuf = LongBuffer.wrap(array);
		LongBuffer LongBuf1 = LongBuffer.allocate(256);
		LongBuf1.put(67543349);
		LongBuf1.put(54757657);
		int i = LongBuf.compareTo(LongBuf1);
		if (i == 1) {
			System.out.println("Buffer is greater than.");
		} else if (i == 0) {
			System.out.println("Buffer is equal to.");
		} else if (i == -1) {
			System.out.println("Buffer is less than.");
		}
		LongBuffer LongBuf2 = LongBuffer.allocate(256);
		LongBuf2.put(676556);
		LongBuf2.put(57567568);
		int i1 = LongBuf2.compareTo(LongBuf1);
		if (i1 == 1) {
			System.out.println("Buffer is greater than.");
		} else if (i1 == 0) {
			System.out.println("Buffer is equal to.");
		} else if (i1 == -1) {
			System.out.println("Buffer is less than.");
		}
		int i3 = LongBuf2.compareTo(LongBuf);
		if (i3 == 1) {
			System.out.println("Buffer is greater than.");
		} else if (i3 == 0) {
			System.out.println("Buffer is equal to.");
		} else if (i3 == -1) {
			System.out.println("Buffer is less than.");
		}
	}
}