Google/IntelliJ and Jakarta

Published by Rob on June 18th, 2003 - in Java

We just had a need to push an input stream into a byte array.

I told the guy who was about to write the code to pause because people must have done this before.

A bit of a googling showed that StreamUtil was a common Utility class name(yeah, yeah util is a code smell). On a whim I went into IntelliJ and used the magic of <ctrl> <alt> space to check out if there were any Stream Utilish classes around (we have a number of jars in our tree due to dependencies etc)…. and found a copy of StreamUtil from here.

After going with IOUtil because that is the suggested way forward, we have a byte array from the stream with one line of code.

Nice.

Related posts:

  1. Dynamic Tree Widget

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© Rob@Rojotek