Adding support for Utf8Appendable.append(ByteBuffer)
This commit is contained in:
parent
75c2b57f25
commit
5a77c0801a
|
@ -13,6 +13,7 @@
|
|||
package org.eclipse.jetty.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
|
@ -97,6 +98,21 @@ public abstract class Utf8Appendable
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void append(ByteBuffer buf)
|
||||
{
|
||||
try
|
||||
{
|
||||
while (buf.remaining() > 0)
|
||||
{
|
||||
appendByte(buf.get());
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void append(byte[] b, int offset, int length)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue