Java InputStream Read Bytes readBytes(InputStream inputStream, int numberOfBytes)

Here you can find the source of readBytes(InputStream inputStream, int numberOfBytes)

Description

read Bytes

License

Open Source License

Declaration

private static byte[] readBytes(InputStream inputStream, int numberOfBytes) 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 {
    private static byte[] readBytes(InputStream inputStream, int numberOfBytes) throws IOException {
        byte[] readBytes = new byte[numberOfBytes];
        inputStream.read(readBytes);/* www  . ja  v  a 2 s.  c o  m*/

        return readBytes;
    }
}

Related

  1. readBytes(InputStream inputStream)
  2. readBytes(InputStream inputStream, boolean close)
  3. readBytes(InputStream inputStream, byte[] buffer, int offset, int length)
  4. readBytes(InputStream inputStream, int bufSize)
  5. readBytes(InputStream inputStream, int length)
  6. readBytes(InputStream inputStream, int numberOfBytes)
  7. readBytes(InputStream ins, byte[] buf, int size)
  8. readBytes(InputStream is)
  9. readBytes(InputStream is)