Skip to content

Commit

Permalink
Merge pull request bluesoft-rnd#5 from zmalinowski/master
Browse files Browse the repository at this point in the history
Fix in IOUtils
  • Loading branch information
tlipski committed Feb 24, 2012
2 parents 7a1b4b0 + 6002692 commit 108df30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>pl.net.bluesoft</groupId>
<artifactId>util</artifactId>
<packaging>jar</packaging>
<version>1.3-SNAPSHOT</version>
<version>1.2.2-SNAPSHOT</version>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/pl/net/bluesoft/util/io/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import java.io.InputStream;

/**
* Usage of this class is discouraged. Please use e.g. Apache Commons IO instead.
* @author tlipski@bluesoft.net.pl
*/
@Deprecated
public class IOUtils {
public static byte[] slurp(InputStream is) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int c=0;
while ((c = is.read()) > 0) {
while ((c = is.read()) >= 0) {
baos.write(c);
}
return baos.toByteArray();
Expand Down

0 comments on commit 108df30

Please sign in to comment.