Skip to content

Instantly share code, notes, and snippets.

Created January 30, 2017 19:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codyhex/36517f8a13d9dd4a368771ee288fb3a8 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
public class InputStreamExample {
public static void main(String[] args){
byte[] bytes = new byte[30];
try {
System.out.println("Available bytes :";
System.out.print("Write something :");
int bytesread =,5,14);
System.out.println("I've read :"+bytesread +" bytes from the InputStream");
} catch (IOException e) {
// TODO Auto-generated catch block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment