@Override
 public ByteBuffer getPVRTextureBuffer() throws IOException {
   final InputStream inputStream = this.getInputStream();
   try {
     final byte[] data = new byte[this.mCCZHeader.getUncompressedSize()];
     StreamUtils.copy(inputStream, data);
     return ByteBuffer.wrap(data);
   } finally {
     StreamUtils.close(inputStream);
   }
 }
Esempio n. 2
0
 /**
  * @return
  * @throws IOException
  */
 public ByteBuffer getPVRTextureBuffer() throws IOException {
   final InputStream inputStream = this.getInputStream();
   try {
     final ByteBufferOutputStream os =
         new ByteBufferOutputStream(
             DataConstants.BYTES_PER_KILOBYTE, DataConstants.BYTES_PER_MEGABYTE / 2);
     StreamUtils.copy(inputStream, os);
     return os.toByteBuffer();
   } finally {
     StreamUtils.close(inputStream);
   }
 }