robe-assets/src/main/java/io/robe/assets/http/HttpAsset.java
private byte[] loadAssetFromURL() {
        try {
            URLConnection cnn = this.asset.openConnection();
            cnn.connect();
            int b = -1;
            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            while ((b = cnn.getInputStream().read()) != -1)
                stream.write(b);
            stream.flush();
            stream.close();

            this.lastModified = cnn.getLastModified();
            this.expireAt = cnn.getExpiration();
            this.ETAG = cnn.getHeaderField(HttpHeaders.ETAG);

            return stream.toByteArray();
        } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
private byte[] loadAssetFromURL() {
        try {
            URLConnection cnn = this.asset.openConnection();
            cnn.connect();
            int b = -1;
            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            while ((b = cnn.getInputStream().read()) != -1)
                stream.write(b);
            stream.flush();
            stream.close();

            this.lastModified = cnn.getLastModified();
            this.expireAt = cnn.getExpiration();
            this.ETAG = cnn.getHeaderField(HttpHeaders.ETAG);

            return stream.toByteArray();
        } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
private byte [ ] loadAssetFromURL ( ) { try { URLConnection cnn = this . asset . openConnection ( ) ; cnn . connect ( ) ; int b = - 1 ; ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ; while ( ( b = cnn . getInputStream ( ) . read ( ) ) != - 1 ) stream . write ( b ) ; stream . flush ( ) ; stream . close ( ) ; this . lastModified = cnn . getLastModified ( ) ; this . expireAt = cnn . getExpiration ( ) ; this . ETAG = cnn . getHeaderField ( HttpHeaders . ETAG ) ; return stream . toByteArray ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw new RuntimeException ( e ) ; } }
Loads http from the http

@return
Loads http from the http