public Write ( |
||
source | ||
sourceIndex | int | |
return | void |
public void Write(StreamBuffer source, int sourceIndex)
{
if (sourceIndex >= source.WrittenBytes)
throw new AegisException(AegisResult.BufferUnderflow, "The argument index(={0}) is larger then source size(={1}).", sourceIndex, source.WrittenBytes);
int copyBytes = source.WrittenBytes - sourceIndex;
if (WrittenBytes + copyBytes > BufferSize)
Resize(BufferSize + copyBytes);
Array.Copy(source.Buffer, sourceIndex, Buffer, WrittenBytes, copyBytes);
WrittenBytes += copyBytes;
OnWritten();
}
StreamBuffer::Write ( |
|
StreamBuffer::Write ( |
|
StreamBuffer::Write ( byte source ) : void | |
StreamBuffer::Write ( byte source, int sourceIndex ) : void | |
StreamBuffer::Write ( byte source, int sourceIndex, int length ) : void | |
StreamBuffer::Write ( char source ) : void | |
StreamBuffer::Write ( int size ) : void |
public static int PutDouble(StreamBuffer destination, double var) { int prevIndex = destination.WrittenBytes; destination.Write(BitConverter.GetBytes(var)); return(prevIndex); }