Code example for IntBuffer

Methods: getput

0
		ShortBuffer sbuffer = buffer.asShortBuffer();
		sbuffer.put(0, (short)0x1234);
		System.out.println((short)sbuffer.get(0));
		 
		IntBuffer ibuffer = buffer.asIntBuffer();
		ibuffer.put(0, 0x13456789);
		System.out.println((short)ibuffer.get(0));
		 
		LongBuffer lbuffer = buffer.asLongBuffer();
		lbuffer.put(0, 0x123456789abcdef0l);
		System.out.println(lbuffer.get(0));
		 
		FloatBuffer fbuffer = buffer.asFloatBuffer();
		fbuffer.put(0, 123.789123f);
		System.out.println(fbuffer.get(0));
		System.out.println(fbuffer.get(0) == 123.789123f);
		 
		DoubleBuffer dbuffer = buffer.asDoubleBuffer();
		dbuffer.put(0, 123.789123f);
		System.out.println(dbuffer.get(0));
Connect your IDE to all the code out there  Get Codota for Java