Added TODO for an optimization.

This commit is contained in:
Simone Bordet 2012-01-27 21:28:18 +01:00
parent 2f58b6980a
commit 3e3f9f181b
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ public class HeadersBlockGenerator
public ByteBuffer generate(short version, Headers headers) throws StreamException
{
// TODO: ByteArrayOutputStream is quite inefficient, but grows on demand; optimize using ByteBuffer ?
Charset iso1 = Charset.forName("ISO-8859-1");
ByteArrayOutputStream buffer = new ByteArrayOutputStream(headers.getSize() * 64);
writeCount(version, buffer, headers.getSize());