But what if count makes handle pass over the end of the file?
--
Cesar Rabak
Em 07/01/2012 10:10, Mariano Martinez Peck < marianop...@gmail.com > escreveu:
FSReadStream >> next: count
| result |
result := ByteArray new: count.
handle at: position read: result startingAt: 1 count: count.
pos
So, here it is: http://code.google.com/p/pharo/issues/detail?id=5161
On Sun, Jan 8, 2012 at 2:39 PM, Mariano Martinez Peck wrote:
>
>
>>> As for the API:
>>
>> 1) There's no next: into: (which returns the amount read). It's really
>> the only way to do buffers without garbage allocations.
>>
>
>
>> As for the API:
>
> 1) There's no next: into: (which returns the amount read). It's really the
> only way to do buffers without garbage allocations.
>
Hi Henry. One of the extensions I needed to add to FSReadStream in order to
make it work with Fuel was exatly #next:into:
The method is:
nex
On Sat, Jan 7, 2012 at 2:05 PM, Henrik Sperre Johansen <
henrik.s.johan...@veloxit.no> wrote:
> On 07.01.2012 13:20, Stéphane Ducasse wrote:
>
>> sounds like :)
>>
>> Stef
>>
>> On Jan 7, 2012, at 1:10 PM, Mariano Martinez Peck wrote:
>>
>> FSReadStream>> next: count
>>> | result |
>>> r
How can we build and improve FS?
I'm too busy with other topics but I would love to get some momentum on that
topic.
Stef
> On 07 Jan 2012, at 14:19, Henrik Sperre Johansen wrote:
>>
>>> 1) There's no next: into: (which returns the amount read). It's really the
>>> only way to do buffers wi
2012/1/7 Sven Van Caekenberghe :
>
> On 07 Jan 2012, at 14:19, Henrik Sperre Johansen wrote:
>
>> 1) There's no next: into: (which returns the amount read). It's really the
>> only way to do buffers without garbage allocations.
>
> The 2 key methods for efficient IO are:
>
> readInto: collection s
On 07 Jan 2012, at 14:19, Henrik Sperre Johansen wrote:
> 1) There's no next: into: (which returns the amount read). It's really the
> only way to do buffers without garbage allocations.
The 2 key methods for efficient IO are:
readInto: collection startingAt: offset count: requestedCount
2012/1/7 Henrik Sperre Johansen :
> On 07.01.2012 14:05, Henrik Sperre Johansen wrote:
>>
>> On 07.01.2012 13:20, Stéphane Ducasse wrote:
>>>
>>> sounds like :)
>>>
>>> Stef
>>>
>>> On Jan 7, 2012, at 1:10 PM, Mariano Martinez Peck wrote:
>>>
FSReadStream>> next: count
| result |
>>>
On 07.01.2012 14:05, Henrik Sperre Johansen wrote:
On 07.01.2012 13:20, Stéphane Ducasse wrote:
sounds like :)
Stef
On Jan 7, 2012, at 1:10 PM, Mariano Martinez Peck wrote:
FSReadStream>> next: count
| result |
result := ByteArray new: count.
handle at: position read: result
On 07.01.2012 13:20, Stéphane Ducasse wrote:
sounds like :)
Stef
On Jan 7, 2012, at 1:10 PM, Mariano Martinez Peck wrote:
FSReadStream>> next: count
| result |
result := ByteArray new: count.
handle at: position read: result startingAt: 1 count: count.
position := positio
sounds like :)
Stef
On Jan 7, 2012, at 1:10 PM, Mariano Martinez Peck wrote:
> FSReadStream >> next: count
> | result |
> result := ByteArray new: count.
> handle at: position read: result startingAt: 1 count: count.
> position := position + 1.
> ^ result
>
>
> shouldn't b
FSReadStream >> next: count
| result |
result := ByteArray new: count.
handle at: position read: result startingAt: 1 count: count.
position := position + 1.
^ result
shouldn't be
FSReadStream >> next: count
| result |
result := ByteArray new: count.
handle at: p
12 matches
Mail list logo