Package org.springframework.core.io.buffer

# Interface CloseableDataBuffer

All Superinterfaces:
  `AutoCloseable`, `DataBuffer`

All Known Implementing Classes:
  `Netty5DataBuffer`

public interface CloseableDataBuffer extends DataBuffer, AutoCloseable
Extension of `DataBuffer` that allows for buffers that can be used in a `try`-with-resources statement.

Since:
  6.0
Author:
  Arjen Poutsma

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.springframework.core.io.buffer.DataBuffer

`DataBuffer.ByteBufferIterator, DataBuffer.ByteProcessor`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Closes this data buffer, freeing any resources.

### Methods inherited from interface org.springframework.core.io.buffer.DataBuffer

`asByteBuffer, asByteBuffer, asInputStream, asInputStream, asOutputStream, capacity, capacity, ensureCapacity, ensureWritable, factory, forEachByte, getByte, indexOf, lastIndexOf, read, read, read, readableByteBuffers, readableByteCount, readPosition, readPosition, retainedSlice, slice, split, toByteBuffer, toByteBuffer, toByteBuffer, toByteBuffer, toString, toString, writableByteBuffers, writableByteCount, write, write, write, write, write, write, writePosition, writePosition`

## Method Details

### close

void close()
Closes this data buffer, freeing any resources.

Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `IllegalStateException` - if this buffer has already been closed