Changed access modifiers of ReadInternal/WriteInternal to protected internal so they can be used in subclasses
This commit is contained in:
parent
85c6ff1da9
commit
8d6f4a2903
@ -42,8 +42,8 @@ namespace UniversalEditor
|
||||
}
|
||||
public abstract void Seek(long length, SeekOrigin position);
|
||||
|
||||
internal abstract int ReadInternal(byte[] buffer, int start, int count);
|
||||
internal abstract int WriteInternal(byte[] buffer, int start, int count);
|
||||
protected internal abstract int ReadInternal(byte[] buffer, int start, int count);
|
||||
protected internal abstract int WriteInternal(byte[] buffer, int start, int count);
|
||||
|
||||
internal virtual void FlushInternal()
|
||||
{
|
||||
|
||||
@ -46,13 +46,13 @@ namespace UniversalEditor.Accessors
|
||||
mvarFileStream.Seek(length, (System.IO.SeekOrigin)origin);
|
||||
}
|
||||
|
||||
internal override int ReadInternal(byte[] buffer, int offset, int count)
|
||||
protected internal override int ReadInternal(byte[] buffer, int offset, int count)
|
||||
{
|
||||
int length = mvarFileStream.Read(buffer, offset, count);
|
||||
return length;
|
||||
}
|
||||
|
||||
internal override int WriteInternal(byte[] buffer, int offset, int count)
|
||||
protected internal override int WriteInternal(byte[] buffer, int offset, int count)
|
||||
{
|
||||
mvarFileStream.Write(buffer, offset, count);
|
||||
return count;
|
||||
|
||||
@ -90,13 +90,13 @@ namespace UniversalEditor.Accessors
|
||||
return data;
|
||||
}
|
||||
|
||||
internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
System.Array.Copy(_data, Position, buffer, start, count);
|
||||
Position += count;
|
||||
return count;
|
||||
}
|
||||
internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
ResizeArray(ref _data, _data.Length + count);
|
||||
System.Array.Copy(buffer, start, _data, _data.Length - count, count);
|
||||
|
||||
@ -67,7 +67,7 @@ namespace UniversalEditor.Accessors
|
||||
mvarBaseStream.Seek(offset, origin);
|
||||
}
|
||||
|
||||
internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
// TODO: will ct ever be != count? should we add ct to Position instead of count??
|
||||
int ct = mvarBaseStream.Read(buffer, start, count);
|
||||
@ -75,7 +75,7 @@ namespace UniversalEditor.Accessors
|
||||
return count;
|
||||
}
|
||||
|
||||
internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
mvarBaseStream.Write(buffer, start, count);
|
||||
// Position += count;
|
||||
|
||||
@ -96,12 +96,12 @@ namespace UniversalEditor.Accessors
|
||||
return new System.String(ToArray());
|
||||
}
|
||||
|
||||
internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int ReadInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
System.Array.Copy(_data, 0, buffer, start, count);
|
||||
return count;
|
||||
}
|
||||
internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
protected internal override int WriteInternal(byte[] buffer, int start, int count)
|
||||
{
|
||||
string value = DefaultEncoding.GetString(buffer);
|
||||
int j = _data.Length;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user