title: BufferedImage & Rasters (Java)
body: <p>Hi can someone explain this piece of code to me </p>
  
  <pre><code>private int[] pixels = ((DataBufferInt)image.getRaster().getDataBuffer()).getData();
  </code></pre>
  
  <p>From what I understand a raster simply represents a group of pixels. getDataBuffer() gives me the editable buffer, so that I can actually alter pixel properties. I am confused, primarily, about .getData() and the DataBufferInt cast, what exactly do those two things do.</p>
  
  <p>Thanks in advance.</p>