本文整理汇总了Java中javax.servlet.http.WebConnection类的典型用法代码示例。如果您正苦于以下问题:Java WebConnection类的具体用法?Java WebConnection怎么用?Java WebConnection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebConnection类属于javax.servlet.http包,在下文中一共展示了WebConnection类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import javax.servlet.http.WebConnection; //导入依赖的package包/类
@Override
public void init(final WebConnection wc) {
Listener listener = null;
try {
listener = new Listener(wc);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
if (Log.doTrace()) {
Log.trace("PingUpgradeServlet$Handler.init() -- Initializing Handler");
}
// flush headers if any
wc.getOutputStream().flush();
wc.getInputStream().setReadListener(listener);
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
}
开发者ID:WASdev,项目名称:sample.daytrader7,代码行数:26,代码来源:PingUpgradeServlet.java
示例2: init
import javax.servlet.http.WebConnection; //导入依赖的package包/类
@Override
public void init(WebConnection wc) {
try (ServletInputStream input = wc.getInputStream(); ServletOutputStream output = wc.getOutputStream();) {
output.write(("upgrade" + CRLF).getBytes());
output.write(("received" + CRLF).getBytes());
output.write("END".getBytes());
} catch (IOException ex) {
}
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:10,代码来源:SampleProtocolHandler.java
示例3: init
import javax.servlet.http.WebConnection; //导入依赖的package包/类
@Override
public void init(WebConnection wc) {
try (ServletInputStream input = wc.getInputStream();
ServletOutputStream output = wc.getOutputStream();) {
} catch (IOException ex) {
}
}
开发者ID:ftomassetti,项目名称:JavaIncrementalParser,代码行数:8,代码来源:MyProtocolHandler.java
示例4: init
import javax.servlet.http.WebConnection; //导入依赖的package包/类
@Override
public void init(WebConnection wc) {
close(wc::getInputStream);
close(wc::getOutputStream);
}
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:6,代码来源:ImmediateCloseConnection.java
示例5: Listener
import javax.servlet.http.WebConnection; //导入依赖的package包/类
private Listener(final WebConnection connection) throws IOException {
this.connection = connection;
this.input = connection.getInputStream();
this.output = connection.getOutputStream();
}
开发者ID:WASdev,项目名称:sample.daytrader7,代码行数:6,代码来源:PingUpgradeServlet.java
注:本文中的javax.servlet.http.WebConnection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论