Code example for ByteBuffer

Methods: asIntBufferorder

	/** A temporary working buffer */ 
    private static ByteBuffer scratchByteBuffer = ByteBuffer.allocateDirect(MAX_GLYPH_SIZE * MAX_GLYPH_SIZE * 4);
    static { 
    /** A temporary working buffer */ 
    private static IntBuffer scratchIntBuffer = scratchByteBuffer.asIntBuffer();
	/** A temporary image used to generate the glyph page */ 
	private static BufferedImage scratchImage = new BufferedImage(MAX_GLYPH_SIZE, MAX_GLYPH_SIZE, BufferedImage.TYPE_INT_ARGB);
	/** The graphics context form the temporary image */ 
	private static Graphics2D scratchGraphics = (Graphics2D)scratchImage.getGraphics();
	static { 
		scratchGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		scratchGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
Stop searching for code, let great code find you!  Add Codota to your java IDE