C# Class Zoompf.SPDYAnalysis.ByteBuffer

Byte Buffer. Handy class that auto resizes as you add bytes and lets you get a byte array out of it
显示文件 Open project: zoompf/SPDYCheck

Public Methods

Method Description
Append ( Stream ms, int size ) : void
Append ( byte b ) : void
Append ( byte array, int length ) : void
AppendHex ( String hexString ) : void

Appends a string of raw Hex digits (i.e. "0xFFAB")

ByteBuffer ( ) : System

Creates a ByteBuffer

ByteBuffer ( int initialCapacity ) : System
Clear ( ) : void
HexStringToBytes ( string hex ) : byte[]

Converts a string of hex digits like "0xFFAB" or "00FFEE" to bytes

Prepend ( byte b ) : void
PrependHex ( String hexString ) : void
ToByteArray ( ) : byte[]

Private Methods

Method Description
resizeByAtLeast ( int size ) : void

Method Details

Append() public method

public Append ( Stream ms, int size ) : void
ms Stream
size int
return void

Append() public method

public Append ( byte b ) : void
b byte
return void

Append() public method

public Append ( byte array, int length ) : void
array byte
length int
return void

AppendHex() public method

Appends a string of raw Hex digits (i.e. "0xFFAB")
public AppendHex ( String hexString ) : void
hexString String string of hex digits, with optional leading 0x
return void

ByteBuffer() public method

Creates a ByteBuffer
public ByteBuffer ( ) : System
return System

ByteBuffer() public method

public ByteBuffer ( int initialCapacity ) : System
initialCapacity int
return System

Clear() public method

public Clear ( ) : void
return void

HexStringToBytes() public static method

Converts a string of hex digits like "0xFFAB" or "00FFEE" to bytes
public static HexStringToBytes ( string hex ) : byte[]
hex string
return byte[]

Prepend() public method

public Prepend ( byte b ) : void
b byte
return void

PrependHex() public method

public PrependHex ( String hexString ) : void
hexString String
return void

ToByteArray() public method

public ToByteArray ( ) : byte[]
return byte[]