(InputProxyStream): generalization of input filters.

This commit is contained in:
morkt
2016-07-02 06:06:32 +04:00
parent cc22f988c6
commit 883ee94a7e
8 changed files with 39 additions and 174 deletions

View File

@@ -134,7 +134,7 @@ namespace GameRes.Formats.VnEngine
}
}
internal class AxrEncryptedStream : ProxyStream
internal class AxrEncryptedStream : InputProxyStream
{
byte[] m_key;
@@ -144,8 +144,6 @@ namespace GameRes.Formats.VnEngine
m_key = key;
}
public override bool CanWrite { get { return false; } }
public override int Read (byte[] buffer, int offset, int count)
{
int start = (int)Position;
@@ -165,15 +163,5 @@ namespace GameRes.Formats.VnEngine
b ^= m_key[start];
return b;
}
public override void Write (byte[] buffer, int offset, int count)
{
throw new NotSupportedException ("AxrEncryptedStream.Write method is not supported");
}
public override void WriteByte (byte value)
{
throw new NotSupportedException ("AxrEncryptedStream.WriteByte method is not supported");
}
}
}