Java Code Examples for java.net.CacheRequest#getBody()

The following examples show how to use java.net.CacheRequest#getBody() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpURLConnection.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 2
Source File: AbstractHttpInputStream.java    From reader with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 3
Source File: AbstractHttpInputStream.java    From reader with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 4
Source File: AbstractHttpInputStream.java    From bluemix-parking-meter with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 5
Source File: HttpURLConnection.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 6
Source File: AbstractHttpInputStream.java    From android-discourse with Apache License 2.0 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest) throws IOException {
    this.in = in;
    this.httpEngine = httpEngine;

    OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

    // some apps return a null body; for compatibility we treat that like a null cache request
    if (cacheBody == null) {
        cacheRequest = null;
    }

    this.cacheBody = cacheBody;
    this.cacheRequest = cacheRequest;
}
 
Example 7
Source File: HttpURLConnection.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 8
Source File: AbstractHttpInputStream.java    From IoTgo_Android_App with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 9
Source File: AbstractHttpInputStream.java    From L.TileLayer.Cordova with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 10
Source File: AbstractHttpInputStream.java    From CordovaYoutubeVideoPlayer with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 11
Source File: HttpURLConnection.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 12
Source File: HttpURLConnection.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 13
Source File: AbstractHttpInputStream.java    From phonegapbootcampsite with MIT License 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}
 
Example 14
Source File: HttpURLConnection.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 15
Source File: HttpURLConnection.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 16
Source File: HttpURLConnection.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 17
Source File: HttpURLConnection.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 18
Source File: HttpURLConnection.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 19
Source File: HttpURLConnection.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public HttpInputStream (InputStream is, CacheRequest cacheRequest) {
    super (is);
    this.cacheRequest = cacheRequest;
    try {
        this.outputStream = cacheRequest.getBody();
    } catch (IOException ioex) {
        this.cacheRequest.abort();
        this.cacheRequest = null;
        this.outputStream = null;
    }
}
 
Example 20
Source File: AbstractHttpInputStream.java    From cordova-amazon-fireos with Apache License 2.0 5 votes vote down vote up
AbstractHttpInputStream(InputStream in, HttpEngine httpEngine, CacheRequest cacheRequest)
    throws IOException {
  this.in = in;
  this.httpEngine = httpEngine;

  OutputStream cacheBody = cacheRequest != null ? cacheRequest.getBody() : null;

  // some apps return a null body; for compatibility we treat that like a null cache request
  if (cacheBody == null) {
    cacheRequest = null;
  }

  this.cacheBody = cacheBody;
  this.cacheRequest = cacheRequest;
}