jetty-9 fixed compiles
This commit is contained in:
parent
af2fe73f33
commit
df8af92aeb
|
@ -485,7 +485,7 @@ public class NCSARequestLog extends AbstractLifeCycle implements RequestLog
|
||||||
if (_logDateCache != null)
|
if (_logDateCache != null)
|
||||||
buf.append(_logDateCache.format(request.getTimeStamp()));
|
buf.append(_logDateCache.format(request.getTimeStamp()));
|
||||||
else
|
else
|
||||||
buf.write(request.getTimeStampBuffer().toString());
|
buf.append(request.getTimeStamp());
|
||||||
|
|
||||||
buf.append("] \"");
|
buf.append("] \"");
|
||||||
buf.append(request.getMethod());
|
buf.append(request.getMethod());
|
||||||
|
@ -506,7 +506,7 @@ public class NCSARequestLog extends AbstractLifeCycle implements RequestLog
|
||||||
else
|
else
|
||||||
buf.append("Async");
|
buf.append("Async");
|
||||||
|
|
||||||
long responseLength = response.getContentCount();
|
long responseLength = response.getLongContentLength();
|
||||||
if (responseLength >= 0)
|
if (responseLength >= 0)
|
||||||
{
|
{
|
||||||
buf.append(' ');
|
buf.append(' ');
|
||||||
|
|
|
@ -41,19 +41,16 @@ import java.nio.charset.Charset;
|
||||||
* in the buffer before the position and the start of this data is given by the return value of {@link #flipToFill(ByteBuffer)}
|
* in the buffer before the position and the start of this data is given by the return value of {@link #flipToFill(ByteBuffer)}
|
||||||
* <p>
|
* <p>
|
||||||
* A typical pattern for using the buffers in this style is:
|
* A typical pattern for using the buffers in this style is:
|
||||||
* <pre>
|
* <blockquote><pre>
|
||||||
* ByteBuffer buf = BufferUtil.allocate(4096);
|
* ByteBuffer buf = BufferUtil.allocate(4096);
|
||||||
*
|
* while(in.isOpen())
|
||||||
* while(true)
|
|
||||||
* {
|
* {
|
||||||
* int pos=BufferUtil.flipToFill(buf);
|
* int pos=BufferUtil.flipToFill(buf);
|
||||||
* if (inChannel.read(buf)<0)
|
* if (in.read(buf)<0)
|
||||||
* break;
|
* break;
|
||||||
* BufferUtil.flipToFlush(buf,pos);
|
* BufferUtil.flipToFlush(buf,pos);
|
||||||
* outChannel.write(buf);
|
* out.write(buf);
|
||||||
* }
|
* }</pre></blockquote>
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class BufferUtil
|
public class BufferUtil
|
||||||
{
|
{
|
||||||
|
@ -123,6 +120,9 @@ public class BufferUtil
|
||||||
* If the buffer is empty, then this call is effectively {@link #clearToFill(ByteBuffer)}.
|
* If the buffer is empty, then this call is effectively {@link #clearToFill(ByteBuffer)}.
|
||||||
* If there is no unused space to fill, a {@link ByteBuffer#compact()} is done to attempt
|
* If there is no unused space to fill, a {@link ByteBuffer#compact()} is done to attempt
|
||||||
* to create space.
|
* to create space.
|
||||||
|
* <p>
|
||||||
|
* This method is used as a replacement to {@link ByteBuffer#compact()}.
|
||||||
|
*
|
||||||
* @param buffer The buffer to flip
|
* @param buffer The buffer to flip
|
||||||
* @return The position of the valid data before the flipped position. This value should be
|
* @return The position of the valid data before the flipped position. This value should be
|
||||||
* passed to a subsequent call to {@link #flipToFlush(ByteBuffer, int)}
|
* passed to a subsequent call to {@link #flipToFlush(ByteBuffer, int)}
|
||||||
|
@ -157,6 +157,8 @@ public class BufferUtil
|
||||||
/** Flip the buffer to Flush mode.
|
/** Flip the buffer to Flush mode.
|
||||||
* The limit is set to the first unused byte(the old position) amd
|
* The limit is set to the first unused byte(the old position) amd
|
||||||
* the position is set to the passed position.
|
* the position is set to the passed position.
|
||||||
|
* <p>
|
||||||
|
* This method is used as a replacement of {@link Buffer#flip()}.
|
||||||
* @param buffer the buffer to be flipped
|
* @param buffer the buffer to be flipped
|
||||||
* @param position The position of valid data to flip to. This should
|
* @param position The position of valid data to flip to. This should
|
||||||
* be the return value of the previous call to {@link #flipToFill(ByteBuffer)}
|
* be the return value of the previous call to {@link #flipToFill(ByteBuffer)}
|
||||||
|
@ -311,6 +313,7 @@ public class BufferUtil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
public static void readFrom(File file, ByteBuffer buffer) throws IOException
|
public static void readFrom(File file, ByteBuffer buffer) throws IOException
|
||||||
{
|
{
|
||||||
RandomAccessFile raf = new RandomAccessFile(file,"r");
|
RandomAccessFile raf = new RandomAccessFile(file,"r");
|
||||||
|
|
Loading…
Reference in New Issue