stacycurl / pimpathon

Adds useful methods to scala & java classes.
Apache License 2.0
35 stars 9 forks source link

Input/OutputStream String ops #195

Closed fommil closed 6 years ago

fommil commented 9 years ago

would be handy. Perhaps much of the File String support could be moved to input/output stream and then accessed via File{Input,Output}Stream internally.

stacycurl commented 9 years ago

This looks epic, I'll have a look and create some stories.

fommil commented 9 years ago

I keep finding myself wanting this one recently.

stacycurl commented 9 years ago

I'm sorry I haven't gotten around to this, would you break this into individual stories ? i.e. one per method; it'll make it clearer and more approachable for me. I can also start with the most important one.

Since you wanted this recently it would be handy if you could use Bintray; is that possible ? publishing to Sonatype is hard enough that I've only done so 5 times, there's much less ceremony for bintray.

Cheers.

On 13 April 2015 at 20:55, Sam Halliday notifications@github.com wrote:

I keep finding myself wanting this one recently.

— Reply to this email directly or view it on GitHub https://github.com/stacycurl/pimpathon/issues/195#issuecomment-92479174.

Stacy

stacycurl commented 9 years ago

Is this basically InputStream.{readString, readBytes, readLines}, OutputStream.{writeString, writeBytes, writeLines}, or were there some other methods ?

stacycurl commented 9 years ago

readBytes & writeBytes look questionable; readBytes because it doesn't know the length of the inputstream so would have to allocate an intermediate strucutre; writeBytes because write already exists.

So, just readString/writeString & readLines/writeLines ?

fommil commented 9 years ago

Byte reading would also be good, toByteArray.

fommil commented 9 years ago

this would be really good. I don't know why I didn't request all this stuff on Input/OutputStream in the first place. The File equivalents would just be conveniences that forward onto that.

stacycurl commented 9 years ago

InputStream.toByteArray is done (as part of 1.4.5)

fommil commented 9 years ago

cool thanks