[ 
https://issues.apache.org/jira/browse/IO-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb resolved IO-410.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.5

URL: http://svn.apache.org/r1545141
Log:
IO-410 Readfully() That Returns A Byte Array

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/IOUtils.java
    
commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java


> [IO] Readfully() That Returns A Byte Array
> ------------------------------------------
>
>                 Key: IO-410
>                 URL: https://issues.apache.org/jira/browse/IO-410
>             Project: Commons IO
>          Issue Type: Wish
>          Components: Utilities
>            Reporter: BELUGA BEHR
>            Priority: Minor
>             Fix For: 2.5
>
>         Attachments: IOUtils.java.patch, IOUtilsTestCase.java.patch
>
>
> I am looking for an implementation withe the following method signature:
> {code}
> public static byte[] readFully(final InputStream input, long length) throws 
> IOException
> {code}
> I have needed this when parsing different protocols.  For example, if the 
> protocol has a fixed-length header with 40 bytes, I may just want to 
> instantiate the small buffer with the entire header and then pick it apart.  
> In my implementation of my business logic, if the header cannot be read in 
> then it should throw an exception for being malformed.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to