congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HttpHeaderHelper.getHeaderKey
Code IndexAdd Tabnine to your IDE (free)

How to use
getHeaderKey
method
in
org.apache.cxf.helpers.HttpHeaderHelper

Best Java code snippets using org.apache.cxf.helpers.HttpHeaderHelper.getHeaderKey (Showing top 16 results out of 315)

origin: org.apache.cxf/cxf-rt-transports-http

public void readFromConnection(HttpURLConnection connection) {
  Map<String, List<String>> origHeaders = connection.getHeaderFields();
  headers.clear();
  for (Entry<String, List<String>> entry : origHeaders.entrySet()) {
    if (entry.getKey() != null) {
      String key = HttpHeaderHelper.getHeaderKey(entry.getKey());
      List<String> old = headers.get(key);
      if (old != null) {
        List<String> nl = new ArrayList<>(old.size() + entry.getValue().size()); 
        nl.addAll(old);
        nl.addAll(entry.getValue());
        headers.put(key, nl);
      } else {
        headers.put(key, entry.getValue());
      }
    }
  }
}
origin: org.apache.cxf/cxf-rt-transports-http

String mappedName = HttpHeaderHelper.getHeaderKey(fname);
List<String> values = headers.get(mappedName);
if (values == null) {
origin: apache/cxf

public static List<String> getHeader(Map<String, List<String>> headerMap, String key) {
  return headerMap.get(getHeaderKey(key));
}
origin: org.apache.cxf/cxf-core

public static List<String> getHeader(Map<String, List<String>> headerMap, String key) {
  return headerMap.get(getHeaderKey(key));
}
origin: org.apache.cxf/cxf-common-utilities

public static List<String> getHeader(Map<String, List<String>> headerMap, String key) {
  return headerMap.get(getHeaderKey(key));
}

origin: org.apache.cxf/cxf-api

public static List<String> getHeader(Map<String, List<String>> headerMap, String key) {
  return headerMap.get(getHeaderKey(key));
}

origin: org.apache.cxf/cxf-bundle-jaxrs

public static List<String> getHeader(Map<String, List<String>> headerMap, String key) {
  return headerMap.get(getHeaderKey(key));
}

origin: org.apache.cxf/cxf-bundle-jaxrs

public void readFromConnection(HttpURLConnection connection) {
  Map<String, List<String>> origHeaders = connection.getHeaderFields();
  headers.clear();
  for (String key : connection.getHeaderFields().keySet()) {
    if (key != null) {
      headers.put(HttpHeaderHelper.getHeaderKey(key), 
        origHeaders.get(key));
    }
  }
}
origin: apache/cxf

public void readFromConnection(HttpURLConnection connection) {
  Map<String, List<String>> origHeaders = connection.getHeaderFields();
  headers.clear();
  for (Entry<String, List<String>> entry : origHeaders.entrySet()) {
    if (entry.getKey() != null) {
      String key = HttpHeaderHelper.getHeaderKey(entry.getKey());
      List<String> old = headers.get(key);
      if (old != null) {
        List<String> nl = new ArrayList<>(old.size() + entry.getValue().size()); 
        nl.addAll(old);
        nl.addAll(entry.getValue());
        headers.put(key, nl);
      } else {
        headers.put(key, entry.getValue());
      }
    }
  }
}
origin: org.apache.cxf/cxf-core

public static String getAttachmentPartHeader(Attachment att) {
  StringBuilder buffer = new StringBuilder(200);
  buffer.append(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.CONTENT_TYPE) + ": "
      + att.getDataHandler().getContentType() + ";\r\n");
  if (att.isXOP()) {
    buffer.append("Content-Transfer-Encoding: binary\r\n");
  }
  String id = att.getId();
  if (id.charAt(0) == '<') {
    id = id.substring(1, id.length() - 1);
  }
  buffer.append("Content-ID: <" + id + ">\r\n\r\n");
  return buffer.toString();
}
origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * Copy the request headers into the message.
 * 
 * @param message the current message
 * @param headers the current set of headers
 */
protected void copyFromRequest(HttpServletRequest req) {
  //TODO how to deal with the fields        
  for (Enumeration<String> e = req.getHeaderNames(); e.hasMoreElements();) {
    String fname = e.nextElement();
    String mappedName = HttpHeaderHelper.getHeaderKey(fname);
    List<String> values;
    if (headers.containsKey(mappedName)) {
      values = headers.get(mappedName);
    } else {
      values = new ArrayList<String>();
      headers.put(mappedName, values);
    }
    for (Enumeration<String> e2 = req.getHeaders(fname); e2.hasMoreElements();) {
      String val = e2.nextElement();
      values.add(val);
    }
  }
  if (!headers.containsKey(Message.CONTENT_TYPE)) {
    headers.put(Message.CONTENT_TYPE, Collections.singletonList(req.getContentType()));
  }
  if (LOG.isLoggable(Level.FINE)) {
    LOG.log(Level.FINE, "Request Headers: " + headers.toString());
  }
}
origin: apache/cxf

public static String getAttachmentPartHeader(Attachment att) {
  StringBuilder buffer = new StringBuilder(200);
  buffer.append(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.CONTENT_TYPE) + ": "
      + att.getDataHandler().getContentType() + ";\r\n");
  if (att.isXOP()) {
    buffer.append("Content-Transfer-Encoding: binary\r\n");
  }
  String id = att.getId();
  if (id.charAt(0) == '<') {
    id = id.substring(1, id.length() - 1);
  }
  buffer.append("Content-ID: <" + id + ">\r\n\r\n");
  return buffer.toString();
}
origin: org.apache.cxf/cxf-api

public static String getAttachmentPartHeader(Attachment att) {
  StringBuilder buffer = new StringBuilder(200);
  buffer.append(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.CONTENT_TYPE) + ": "
      + att.getDataHandler().getContentType() + ";\r\n");
  if (att.isXOP()) {
    buffer.append("Content-Transfer-Encoding: binary\r\n");
  }
  String id = att.getId();
  if (id.charAt(0) == '<') {
    id = id.substring(1, id.length() - 1);
  }
  buffer.append("Content-ID: <" + id + ">\r\n\r\n");
  return buffer.toString();
}
origin: org.apache.cxf/cxf-bundle-jaxrs

public static String getAttachmentPartHeader(Attachment att) {
  StringBuilder buffer = new StringBuilder(200);
  buffer.append(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.CONTENT_TYPE) + ": "
      + att.getDataHandler().getContentType() + ";\r\n");
  if (att.isXOP()) {
    buffer.append("Content-Transfer-Encoding: binary\r\n");
  }
  String id = att.getId();
  if (id.charAt(0) == '<') {
    id = id.substring(1, id.length() - 1);
  }
  buffer.append("Content-ID: <" + id + ">\r\n\r\n");
  return buffer.toString();
}
origin: apache/cxf

String mappedName = HttpHeaderHelper.getHeaderKey(fname);
List<String> values = headers.get(mappedName);
if (values == null) {
origin: org.apache.cxf/cxf-rt-bindings-http

public void handleMessage(Message message) throws Fault {
  Map<String, List<String>> headers = CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
  if (headers == null) {
    headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
    message.put(Message.PROTOCOL_HEADERS, headers);
  }
  String ct = (String)message.getExchange().get(Endpoint.class).get(HttpHeaderHelper.CONTENT_TYPE);
  if (ct != null) {
    List<String> contentType = new ArrayList<String>();
    contentType.add(ct);
    headers.put(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.CONTENT_TYPE), contentType);
    message.put(HttpHeaderHelper.CONTENT_TYPE, ct);
  }
  
}
org.apache.cxf.helpersHttpHeaderHelpergetHeaderKey

Popular methods of HttpHeaderHelper

  • mapCharset
  • findCharset
  • getHeader

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now