Codota Logo
NettyMultipartBody
Code IndexAdd Codota to your IDE (free)

How to use
NettyMultipartBody
in
com.ning.http.client.providers.netty.request.body

Best Java code snippets using com.ning.http.client.providers.netty.request.body.NettyMultipartBody (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: com.ning/async-http-client

nettyBody = new NettyMultipartBody(request.getParts(), request.getHeaders(), nettyConfig);
origin: io.gatling/async-http-client

private NettyBody body(Request request, HttpMethod method) throws IOException {
  NettyBody nettyBody = null;
  if (method != HttpMethod.CONNECT) {
    Charset bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : Charset.forName(request.getBodyEncoding());
    if (request.getByteData() != null)
      nettyBody = new NettyByteArrayBody(request.getByteData());
    else if (request.getStringData() != null)
      nettyBody = new NettyByteArrayBody(request.getStringData().getBytes(bodyCharset));
    else if (request.getStreamData() != null)
      nettyBody = new NettyInputStreamBody(request.getStreamData());
    else if (isNonEmpty(request.getFormParams())) {
      String contentType = null;
      if (!request.getHeaders().containsKey(HttpHeaders.Names.CONTENT_TYPE))
        contentType = HttpHeaders.Values.APPLICATION_X_WWW_FORM_URLENCODED;
      nettyBody = new NettyByteArrayBody(computeBodyFromParams(request.getFormParams(), bodyCharset), contentType);
    } else if (isNonEmpty(request.getParts()))
      nettyBody = new NettyMultipartBody(request.getParts(), request.getHeaders(), nettyConfig);
    else if (request.getFile() != null)
      nettyBody = new NettyFileBody(request.getFile(), nettyConfig);
    else if (request.getBodyGenerator() instanceof FileBodyGenerator) {
      FileBodyGenerator fileBodyGenerator = (FileBodyGenerator) request.getBodyGenerator();
      nettyBody = new NettyFileBody(fileBodyGenerator.getFile(), fileBodyGenerator.getRegionSeek(),
          fileBodyGenerator.getRegionLength(), nettyConfig);
    } else if (request.getBodyGenerator() instanceof InputStreamBodyGenerator)
      nettyBody = new NettyInputStreamBody(InputStreamBodyGenerator.class.cast(request.getBodyGenerator()).getInputStream());
    else if (request.getBodyGenerator() != null)
      nettyBody = new NettyBodyBody(request.getBodyGenerator().createBody(), nettyConfig);
  }
  return nettyBody;
}
com.ning.http.client.providers.netty.request.bodyNettyMultipartBody

Most used methods

  • <init>

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now