title: How can i change the BufferedImage type?
body: <p>I am using <code>ImageIO</code> to import an Image to store the image components (alpha, red, green, blue) in a byte array. Later on i need to read from this byte array, But i don't know in which sequence the components (I don't know if first element is alpha, second is red ... or not in the array) are stored and is alpha even stored ? </p>
  
  <p>Is there a default sequence ? or Is there a way to change the sequence to some desired one like ABGR or ARGB etc. </p>
  
  <p>Current code for getting the components in the array.</p>
  
  <pre><code>    BufferedImage temp;
  
      try{
          temp = ImageIO.read(new File(path));
          ImageArray = ((DataBufferByte)temp.getRaster().getDataBuffer()).getData();
      }catch(IOException ex){
          ex.printStackTrace();
      }
  </code></pre>
  
  <p>the java documents didn't help me at all. </p>