class Test {
    MemoryStream m_stream;

    this(MemoryStream stream) {
        m_stream = stream;
    }

    void write(byte val) {
        m_stream.write(val);
    }

    byte read() {
        byte val;
        m_stream.read(val);
        return val;
    }
}

void main() {
    byte[] read = [0, 2, 4, 6, 8, 10, 12];
    auto t = new Test(read);
    byte val = t.read();
    t.write(1);
    byte val1 = t.m_stream.data;
    writeln(val, val1);
}


since memorystream is deprecated how do i do something like this with Input and Output ranges? How can i fill up an array with ranges like you can do with streams?
Thanks.

Reply via email to