2013-01-01 16:03:18 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2013 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:
|
|
|
|
*
|
|
|
|
* http://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.buffer;
|
|
|
|
|
2013-06-13 06:14:21 +02:00
|
|
|
import io.netty.util.ReferenceCounted;
|
|
|
|
|
2013-01-01 16:03:18 +01:00
|
|
|
/**
|
2013-02-10 05:10:09 +01:00
|
|
|
* A packet which is send or receive.
|
2013-01-01 16:03:18 +01:00
|
|
|
*/
|
2013-02-10 05:10:09 +01:00
|
|
|
public interface ByteBufHolder extends ReferenceCounted {
|
2013-01-01 16:03:18 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the data which is held by this {@link ByteBufHolder}.
|
|
|
|
*/
|
2013-05-01 10:04:43 +02:00
|
|
|
ByteBuf content();
|
2013-01-01 16:03:18 +01:00
|
|
|
|
|
|
|
/**
|
2013-02-10 05:10:09 +01:00
|
|
|
* Create a deep copy of this {@link ByteBufHolder}.
|
2013-01-01 16:03:18 +01:00
|
|
|
*/
|
|
|
|
ByteBufHolder copy();
|
2013-02-13 08:09:33 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
ByteBufHolder retain();
|
|
|
|
|
|
|
|
@Override
|
|
|
|
ByteBufHolder retain(int increment);
|
2013-01-01 16:03:18 +01:00
|
|
|
}
|