18 using Lucene.Net.Support;
20 namespace Lucene.Net.Index
40 public void Init(
int address)
43 System.Diagnostics.Debug.Assert(slice != null);
46 System.Diagnostics.Debug.Assert(upto < slice.Length);
50 public void WriteByte(byte b)
52 System.Diagnostics.Debug.Assert(slice != null);
55 upto = pool.AllocSlice(slice, upto);
57 offset0 = pool.byteOffset;
58 System.Diagnostics.Debug.Assert(slice != null);
61 System.Diagnostics.Debug.Assert(upto != slice.Length);
64 public void WriteBytes(byte[] b,
int offset,
int len)
66 int offsetEnd = offset + len;
67 while (offset < offsetEnd)
72 upto = pool.AllocSlice(slice, upto);
74 offset0 = pool.byteOffset;
77 slice[upto++] = b[offset++];
78 System.Diagnostics.Debug.Assert(upto != slice.Length);
87 public void WriteVInt(
int i)
89 while ((i & ~ 0x7F) != 0)
91 WriteByte((byte) ((i & 0x7f) | 0x80));