@Override
public Object aroundReadFrom(ReaderInterceptorContext interceptorContext)
throws IOException, WebApplicationException {
logger.info("ClientSecondReaderInterceptor invoked.");
InputStream inputStream = interceptorContext.getInputStream();
byte[] bytes = new byte[inputStream.available()];
inputStream.read(bytes);
String requestContent = new String(bytes);
requestContent = requestContent + " Request changed in ClientSecondReaderInterceptor.";
interceptorContext.setInputStream(new ByteArrayInputStream(requestContent.getBytes()));
return interceptorContext.proceed();
}
ClientSecondReaderInterceptor.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Mastering-Java-EE-Development-with-WildFly
作者:
评论列表
文章目录