code: static CompressedTexture load(InputStream stream, int maxLength,
                                    boolean closeStream)
              throws IOException {
          byte[] data;
          try {
              data = maxLength >= 0
                  ? readBytes(stream, maxLength)
                  : readBytes(stream);
          } finally {
              if (closeStream) {
                  stream.close();
              }
          }
  
          Reader reader = new Reader(data);
  
          GVRCompressedTextureLoader valid = null;
          List<GVRCompressedTextureLoader> loaders = GVRCompressedTextureLoader
                  .getLoaders();
          synchronized (loaders) {
              for (GVRCompressedTextureLoader loader : loaders) {
                  if (loader.sniff(data, reader)) {
                      if (valid != null) {
                          throw new IllegalArgumentException(
                                  "Multiple loaders think this smells right");
                      }
                      valid = loader;
                  }
                  reader.reset();
              }
              if (valid == null) {
                  throw new IllegalArgumentException(
                          "No loader thinks this smells right");
              }
              return valid.parse(data, reader);
          }
      }
docs: Loads a file into memory; detects type, and calls the appropriate
  {@link GVRCompressedTextureLoader#parse(byte[], Reader)} method.
  
  @param stream
  InputStream containing a compressed texture file
  @param maxLength
  Max length to read. -1 for unlimited.
  @param closeStream
  Close {@code stream} on exit?
  @return Normally, one and only one {@link GVRCompressedTextureLoader}
  will recognize the file, and this method will return a
  {@link CompressedTexture}, ready to be passed to EGL via
  {@link CompressedTexture#glCompressedTexImage2D(int, int)}. If no
  loaders recognize the file, or if multiple loaders recognize the
  file, this method will return <code>null</null>.
  @throws IOException
  Does not catch any internal exceptions