protected SpdyFrameDecoder( SpdyVersion version, int maxChunkSize, SpdyHeaderBlockDecoder headerBlockDecoder) { if (version == null) { throw new NullPointerException("version"); } if (maxChunkSize <= 0) { throw new IllegalArgumentException( "maxChunkSize must be a positive integer: " + maxChunkSize); } spdyVersion = version.getVersion(); this.maxChunkSize = maxChunkSize; this.headerBlockDecoder = headerBlockDecoder; state = State.READ_COMMON_HEADER; }
/** * Creates a new instance. * * @param version the protocol version */ public SpdyHttpEncoder(SpdyVersion version) { if (version == null) { throw new NullPointerException("version"); } spdyVersion = version.getVersion(); }