Java源码示例:org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart.HttpPostRequestDecoder
示例1
private void reset() {
// destroy() can fail because some data is stored multiple times in the decoder causing an IllegalReferenceCountException
// see https://github.com/netty/netty/issues/7814
try {
currentHttpPostRequestDecoder.getBodyHttpDatas().clear();
} catch (HttpPostRequestDecoder.NotEnoughDataDecoderException ned) {
// this method always fails if not all chunks were offered to the decoder yet
LOG.debug("Error while resetting handler.", ned);
}
currentHttpPostRequestDecoder.destroy();
currentHttpPostRequestDecoder = null;
currentHttpRequest = null;
currentUploadDir = null;
currentJsonPayload = null;
}
示例2
private void reset() {
// destroy() can fail because some data is stored multiple times in the decoder causing an IllegalReferenceCountException
// see https://github.com/netty/netty/issues/7814
try {
currentHttpPostRequestDecoder.getBodyHttpDatas().clear();
} catch (HttpPostRequestDecoder.NotEnoughDataDecoderException ned) {
// this method always fails if not all chunks were offered to the decoder yet
LOG.debug("Error while resetting handler.", ned);
}
currentHttpPostRequestDecoder.destroy();
currentHttpPostRequestDecoder = null;
currentHttpRequest = null;
currentUploadDir = null;
currentJsonPayload = null;
}
示例3
private void reset() {
// destroy() can fail because some data is stored multiple times in the decoder causing an IllegalReferenceCountException
// see https://github.com/netty/netty/issues/7814
try {
currentHttpPostRequestDecoder.getBodyHttpDatas().clear();
} catch (HttpPostRequestDecoder.NotEnoughDataDecoderException ned) {
// this method always fails if not all chunks were offered to the decoder yet
LOG.debug("Error while resetting handler.", ned);
}
currentHttpPostRequestDecoder.destroy();
currentHttpPostRequestDecoder = null;
currentHttpRequest = null;
currentUploadDir = null;
currentJsonPayload = null;
}