org.eclipse.jetty.io
类 BufferUtil

java.lang.Object
  继承者 org.eclipse.jetty.io.BufferUtil

public class BufferUtil
extends Object

Buffer utility methods.


构造方法摘要
BufferUtil()
           
 
方法摘要
static boolean isPrefix(Buffer prefix, Buffer buffer)
           
static void prependHexInt(Buffer buffer, int n)
          Add hex integer BEFORE current getIndex.
static void putCRLF(Buffer buffer)
           
static void putDecInt(Buffer buffer, int n)
           
static void putDecLong(Buffer buffer, long n)
           
static void putHexInt(Buffer buffer, int n)
           
static String to8859_1_String(Buffer buffer)
           
static Buffer toBuffer(long value)
           
static int toInt(Buffer buffer)
          Convert buffer to an integer.
static long toLong(Buffer buffer)
          Convert buffer to an long.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

BufferUtil

public BufferUtil()
方法详细信息

toInt

public static int toInt(Buffer buffer)
Convert buffer to an integer. Parses up to the first non-numeric character. If no number is found an IllegalArgumentException is thrown

参数:
buffer - A buffer containing an integer. The position is not changed.
返回:
an int

toLong

public static long toLong(Buffer buffer)
Convert buffer to an long. Parses up to the first non-numeric character. If no number is found an IllegalArgumentException is thrown

参数:
buffer - A buffer containing an integer. The position is not changed.
返回:
an int

putHexInt

public static void putHexInt(Buffer buffer,
                             int n)

prependHexInt

public static void prependHexInt(Buffer buffer,
                                 int n)
Add hex integer BEFORE current getIndex.

参数:
buffer -
n -

putDecInt

public static void putDecInt(Buffer buffer,
                             int n)

putDecLong

public static void putDecLong(Buffer buffer,
                              long n)

toBuffer

public static Buffer toBuffer(long value)

putCRLF

public static void putCRLF(Buffer buffer)

isPrefix

public static boolean isPrefix(Buffer prefix,
                               Buffer buffer)

to8859_1_String

public static String to8859_1_String(Buffer buffer)


Copyright © 2013. All Rights Reserved.