From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,604393fcefde729a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-15 08:25:07 PST Message-ID: <3CBAEFA8.F331E38E@sympatico.ca> From: Ken Burtch X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: In-memory Streams References: <4519e058.0204150656.e8d2e7a@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 15 Apr 2002 11:20:08 -0400 NNTP-Posting-Host: 64.229.185.253 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1018884051 64.229.185.253 (Mon, 15 Apr 2002 11:20:51 EDT) NNTP-Posting-Date: Mon, 15 Apr 2002 11:20:51 EDT Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:22557 Date: 2002-04-15T11:20:08-04:00 List-Id: There is an in-memory stream example in the Big Online Book of Linux Ada Programming: http://www.pegasoft.ca/homes/11.html#11.12 Ken B. Ted Dennison wrote: > > "Nazgul" wrote in message news:... > > Hi, I need to create a 512 bytes buffer in memory, in which I can write date > > like in a stream ('output). Then, when the buffer is full, I have to write > > it to a file, for example with Buffer'Output, or once byte each time, but > > the raw content, no headers or something, just the raw 512 bytes. > > > > Where should I begin to look at? Something to do with storage pools? > > It sounds pretty simple to me. You just need to derive a type from > Ada.Streams.Root_Stream_Type, then write your own versions of Read and > Write (see the package spec in the ARM at > http://www.ada-auth.org/~acats/arm-html/RM-13-13-1.html ). I don't > know why you think storage pools would need to get involved. > > -- > T.E.D. > Home - mailto:dennison@telepath.com (Yahoo: Ted_Dennison) > Homepage - http://www.telepath.com/dennison/Ted/TED.html -- Ken O. Burtch: http://www.pegasoft.ca : Pegasoft System Manager in a Box / Business Shell : R.R.#1 Bio: 36;Bsc,UI,Lang,Games;Toons,Elves,SF,Pizza;Xian : Jordan Station, ON ``````````````````````````````````````````````````````` Canada L0R 1S0