public static TextureData newTextureData(GLProfile glp,InputStream stream,boolean useMipMaps) throws IOException {
  if (!(stream instanceof BufferedInputStream)) {
    stream=new BufferedInputStream(stream);
  }
  boolean ddsFormat=DDSImage.isDDSImage(stream);
  if (!ddsFormat) {
    BufferedImage img=ImageIO.read(stream);
    if (img != null)     return AWTTextureIO.newTextureData(glp,img,useMipMaps);
  }
  return TextureIO.newTextureData(glp,stream,useMipMaps,null);
}

public static TextureData newTextureData ( GLProfile glp , InputStream stream , boolean useMipMaps ) throws IOException { if ( ! ( stream instanceof BufferedInputStream ) ) { stream = new BufferedInputStream ( stream ) ; } boolean ddsFormat = DDSImage . isDDSImage ( stream ) ; if ( ! ddsFormat ) { BufferedImage img = ImageIO . read ( stream ) ; if ( img != null ) return AWTTextureIO . newTextureData ( glp , img , useMipMaps ) ; } return TextureIO . newTextureData ( glp , stream , useMipMaps , null ) ; }
creates texturedata from an inputstream . does no opengl work .
