move code into correct directory structure

This commit is contained in:
Eliot Jones
2017-11-09 19:22:52 +00:00
parent 2897051075
commit fd53d91c28
147 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
namespace UglyToad.Pdf.IO
{
using System.Collections.Generic;
public class ByteArrayInputBytes : IInputBytes
{
private readonly IReadOnlyList<byte> bytes;
public ByteArrayInputBytes(IReadOnlyList<byte> bytes)
{
this.bytes = bytes;
CurrentOffset = -1;
}
public int CurrentOffset { get; private set; }
public bool MoveNext()
{
if (CurrentOffset == bytes.Count - 1)
{
return false;
}
CurrentOffset++;
CurrentByte = bytes[CurrentOffset];
return true;
}
public byte CurrentByte { get; private set; }
public byte? Peek()
{
if (CurrentOffset == bytes.Count - 1)
{
return null;
}
return bytes[CurrentOffset + 1];
}
}
}