[Glass] How to properly write bytes objects into binary streams?

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Wed Sep 3 11:43:45 PDT 2014


On Wed, Sep 3, 2014 at 1:12 PM, Martin McClure <
martin.mcclure at gemtalksystems.com> wrote:

> On 09/03/2014 06:58 AM, Mariano Martinez Peck wrote:
>
>>
>>
> [...]
>
>
>
>> But again, I want to go step by step.
>>
>>     If the answer to either of these is "yes," then things get a bit
>>     more complicated.
>>
>>
>> Even if they would be desired later, right now, I am fine with a "No"
>> answer.
>>
>>
> OK, for the limited gs-to-gs case, same endianness...
>
> Since in GemStone #replaceFrom:to:with: expects to be copying from a
> collection, not (for instance) a LargeInteger, the most generic way to copy
> the bytes of a byte object is probably to write a loop that uses
> #_basicSize and #_basicAt: to access the bytes.
>

OK. Thanks. But then how can I create an empty instance of one of them, in
a general way, and with a certain size? I tried:

LargeInteger _basicNew: 10

But it fails.

Thanks,




-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140903/a99fac7a/attachment.html>


More information about the Glass mailing list