Overridden allocate() to support direct buffers.

This commit is contained in:
Simone Bordet 2012-06-11 14:21:03 +02:00
parent b4e45d1bb7
commit 4bb0a30839
1 changed files with 6 additions and 0 deletions

View File

@ -68,4 +68,10 @@ public class ByteBufferDataInfo extends DataInfo
}
return space;
}
@Override
protected ByteBuffer allocate(int size)
{
return buffer.isDirect() ? ByteBuffer.allocateDirect(size) : super.allocate(size);
}
}