Java InputStream Read All readAll(InputStream in)

Here you can find the source of readAll(InputStream in)

Description

read All

License

Open Source License

Declaration

public static byte[] readAll(InputStream in) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import java.io.InputStream;

public class Main {
    public static byte[] readAll(InputStream in) throws IOException {
        byte[] result = new byte[in.available()];
        in.read(result);//from  www . ja  v a 2 s. co  m
        return result;
    }
}

Related

  1. readAll(final InputStream is)
  2. readAll(InputStream i, byte b[])
  3. readall(InputStream in)
  4. readAll(InputStream in)
  5. readAll(InputStream in)
  6. readAll(InputStream in)