iTextSharp.text.pdf.hyphenation.ByteVector.Alloc C# (CSharp) Method

Alloc() public method

public Alloc ( int size ) : int
size int
return int
		public int Alloc(int size) {
			int index = n;
			int len = arr.Length;
			if (n + size >= len) {
				byte[] aux = new byte[len + BLOCK_SIZE];
				Array.Copy(arr, 0, aux, 0, len);
				arr = aux;
			}
			n += size;
			return index;
		}

Usage Example

 public HyphenationTree()
 {
     stoplist = new Dictionary<string,List<object>>(23);    // usually a small table
     classmap = new TernaryTree();
     vspace = new ByteVector();
     vspace.Alloc(1);    // this reserves index 0, which we don't use
 }
All Usage Examples Of iTextSharp.text.pdf.hyphenation.ByteVector::Alloc