Bzip2DecoderTest.java — netty Source File
Architecture documentation for Bzip2DecoderTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.compression;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedChannel;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import static io.netty.handler.codec.compression.Bzip2Constants.*;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.fail;
public class Bzip2DecoderTest extends AbstractDecoderTest {
private static final byte[] DATA = { 0x42, 0x5A, 0x68, 0x37, 0x31, 0x41, 0x59, 0x26, 0x53,
0x59, 0x77, 0x7B, (byte) 0xCA, (byte) 0xC0, 0x00, 0x00,
0x00, 0x05, (byte) 0x80, 0x00, 0x01, 0x02, 0x00, 0x04,
0x20, 0x20, 0x00, 0x30, (byte) 0xCD, 0x34, 0x19, (byte) 0xA6,
(byte) 0x89, (byte) 0x99, (byte) 0xC5, (byte) 0xDC, (byte) 0x91,
0x4E, 0x14, 0x24, 0x1D, (byte) 0xDE, (byte) 0xF2, (byte) 0xB0, 0x00 };
public Bzip2DecoderTest() throws Exception {
}
@Override
protected EmbeddedChannel createChannel() {
return new EmbeddedChannel(new Bzip2Decoder());
}
private void writeInboundDestroyAndExpectDecompressionException(ByteBuf in) {
try {
channel.writeInbound(in);
} finally {
try {
destroyChannel();
fail();
} catch (DecompressionException ignored) {
// expected
}
}
}
// ... (141 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does Bzip2DecoderTest.java do?
Bzip2DecoderTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is Bzip2DecoderTest.java in the architecture?
Bzip2DecoderTest.java is located at codec-compression/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java (domain: Buffer, subdomain: Allocators, directory: codec-compression/src/test/java/io/netty/handler/codec/compression).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free