javax.servlet.http.HttpServletRequestWrapper.getReader()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getReader()方法的一些代码示例,展示了HttpServletRequestWrapper.getReader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getReader()方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getReader

HttpServletRequestWrapper.getReader介绍

暂无

代码示例

代码示例来源:origin: cloudfoundry/uaa

@Override
public BufferedReader getReader() throws IOException {
  return super.getReader();
}

代码示例来源:origin: javamelody/javamelody

/** {@inheritDoc} */
@Override
public BufferedReader getReader() throws IOException {
  if (bufferedInputStream == null) {
    return super.getReader();
  }
  if (reader == null) {
    // use character encoding as said in the API
    final String characterEncoding = this.getCharacterEncoding();
    if (characterEncoding == null) {
      reader = new BufferedReader(new InputStreamReader(this.getInputStream()));
    } else {
      reader = new BufferedReader(
          new InputStreamReader(this.getInputStream(), characterEncoding));
    }
  }
  return reader;
}

代码示例来源:origin: ch.qos.logback/logback-access

@Override
public BufferedReader getReader() throws IOException {
  if (!postedParametersMode) {
    return reader;
  } else {
    return super.getReader();
  }
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public BufferedReader getReader() throws IOException
{
  BufferedReader reader = super.getReader();
  return reader;
}

代码示例来源:origin: com.github.wuic/wuic-servlet

/**
 * {@inheritDoc}
 */
@Override
public BufferedReader getReader() throws IOException {
  // Synchronized access
  synchronized (mutex) {
    return super.getReader();
  }
}

代码示例来源:origin: com.atlassian.jira/jira-core

public BufferedReader getReader() throws IOException
{
  if (capturingBufferedReader == null)
  {
    capturingBufferedReader = new CapturingBufferedReader(super.getReader());
  }
  return capturingBufferedReader;
}

代码示例来源:origin: SAP/cf-java-logging-support

@Override
public BufferedReader getReader() throws IOException {
  wrappedReader = new WrappedInputReader(super.getReader());
  return wrappedReader;
}

代码示例来源:origin: Jasig/uPortal

@Override
public BufferedReader getReader() throws IOException {
  this.checkState();
  return super.getReader();
}

代码示例来源:origin: org.jasig.portal/uPortal-rendering

@Override
public BufferedReader getReader() throws IOException {
  this.checkState();
  return super.getReader();
}

代码示例来源:origin: org.keycloak/keycloak-servlet-adapter-spi

@Override
public BufferedReader getReader() throws IOException {
  if (!needRequestRestore) return super.getReader();
  return new BufferedReader(new InputStreamReader(getInputStream()));
}

代码示例来源:origin: org.apache.wink/wink-server

@Override
public BufferedReader getReader() throws IOException {
  return getCorrectRequest().getReader();
}

代码示例来源:origin: org.finra.herd/herd-ui

@Override
public BufferedReader getReader() throws IOException
{
  if (payload == null)
  {
    return super.getReader();
  }
  else
  {
    if (reader == null)
    {
      this.reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(payload), getCharacterEncoding()));
    }
    return reader;
  }
}

代码示例来源:origin: FINRAOS/herd

@Override
public BufferedReader getReader() throws IOException
{
  if (payload == null)
  {
    return super.getReader();
  }
  else
  {
    if (reader == null)
    {
      this.reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(payload), getCharacterEncoding()));
    }
    return reader;
  }
}

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-extdirect-plugin

@Override
 public BufferedReader getReader() throws IOException {
  if (reader == null) {
   try {
    reader = super.getReader();
   }
   catch (IllegalStateException e) {
    // HACK avoid "java.lang.IllegalStateException: STREAMED" which is thrown in case of request.getReader()
    // and request.getInputStream() was already called as in case of getting request parameters
    reader = new RequestBoundReader(new InputStreamReader(getInputStream(), EncodingUtils.UTF8), request);
   }
  }
  return reader;
 }
};

代码示例来源:origin: org.sonatype.nexus/nexus-extdirect

@Override
 public BufferedReader getReader() throws IOException {
  if (reader == null) {
   try {
    reader = super.getReader();
   }
   catch (IllegalStateException e) {
    // HACK avoid "java.lang.IllegalStateException: STREAMED" which is thrown in case of request.getReader()
    // and request.getInputStream() was already called as in case of getting request parameters
    reader = new RequestBoundReader(new InputStreamReader(getInputStream(), EncodingUtils.UTF8), request);
   }
  }
  return reader;
 }
};

代码示例来源:origin: net.bull.javamelody/javamelody-core

/** {@inheritDoc} */
@Override
public BufferedReader getReader() throws IOException {
  if (bufferedInputStream == null) {
    return super.getReader();
  }
  if (reader == null) {
    // use character encoding as said in the API
    final String characterEncoding = this.getCharacterEncoding();
    if (characterEncoding == null) {
      reader = new BufferedReader(new InputStreamReader(this.getInputStream()));
    } else {
      reader = new BufferedReader(
          new InputStreamReader(this.getInputStream(), characterEncoding));
    }
  }
  return reader;
}

代码示例来源:origin: com.cisco.oss.foundation/http-server-jetty

@Override
public BufferedReader getReader() throws IOException
{
  tracer.log("Get Reader");
  if (reader != null)
  {
    return reader;
  }
  // make sure servlet spec is still followed
  if (stream != null)
  {
    throw new IllegalStateException("getInputStream() previously called");
  }
  BufferedReader delegate = super.getReader();
  this.reader = new TraceServletReader(delegate,tracer);
  return this.reader;
}

相关文章

HttpServletRequestWrapper类方法