@@ -0,0 +1,2878 @@
+/*%0A * Copyright (C) 2012-2013 Facebook, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.facebook.nifty.core;%0A%0Aimport org.apache.thrift.transport.TTransport;%0Aimport org.apache.thrift.transport.TTransportException;%0A%0A/**%0A * Composes a read-only transport and a write-only transport to produce a read/write transport%0A */%0Apublic class TInputOutputCompositeTransport extends TTransport%0A%7B%0A    private final TTransport inputTransport;%0A    private final TTransport outputTransport;%0A%0A    public TInputOutputCompositeTransport(TTransport inputTransport, TTransport outputTransport)%0A    %7B%0A        this.inputTransport = inputTransport;%0A        this.outputTransport = outputTransport;%0A    %7D%0A%0A    // Delegate input methods%0A%0A    @Override%0A    public int read(byte%5B%5D buf, int off, int len) throws TTransportException%0A    %7B%0A        return inputTransport.read(buf, off, len);%0A    %7D%0A%0A    @Override%0A    public int readAll(byte%5B%5D buf, int off, int len) throws TTransportException%0A    %7B%0A        return inputTransport.readAll(buf, off, len);%0A    %7D%0A%0A    @Override%0A    public boolean peek()%0A    %7B%0A        return inputTransport.peek();%0A    %7D%0A%0A    @Override%0A    public byte%5B%5D getBuffer()%0A    %7B%0A        return inputTransport.getBuffer();%0A    %7D%0A%0A    @Override%0A    public int getBufferPosition()%0A    %7B%0A        return inputTransport.getBufferPosition();%0A    %7D%0A%0A    @Override%0A    public int getBytesRemainingInBuffer()%0A    %7B%0A        return inputTransport.getBytesRemainingInBuffer();%0A    %7D%0A%0A    @Override%0A    public void consumeBuffer(int len)%0A    %7B%0A        inputTransport.consumeBuffer(len);%0A    %7D%0A%0A    // Delegate output methods%0A%0A    @Override%0A    public void write(byte%5B%5D buf) throws TTransportException%0A    %7B%0A        outputTransport.write(buf);%0A    %7D%0A%0A    @Override%0A    public void write(byte%5B%5D buf, int off, int len) throws TTransportException%0A    %7B%0A        outputTransport.write(buf, off, len);%0A    %7D%0A%0A    @Override%0A    public void flush() throws TTransportException%0A    %7B%0A        outputTransport.flush();%0A    %7D%0A%0A    // Unsupported methods%0A%0A    @Override%0A    public void close()%0A    %7B%0A        throw new UnsupportedOperationException();%0A    %7D%0A%0A    @Override%0A    public boolean isOpen()%0A    %7B%0A        throw new UnsupportedOperationException();%0A    %7D%0A%0A    @Override%0A    public void open() throws TTransportException%0A    %7B%0A        throw new UnsupportedOperationException();%0A    %7D%0A%7D%0A

Move TInputOutputCompositeTransport to core