title: Reading /dev/input/js0 from Java
body: <p>I'm trying to read <code>/dev/input/js0</code> from Java but I keep getting</p>
  
  <pre><code>java.io.IOException: Invalid argument
  at java.io.FileInputStream.read0(Native Method)
  at java.io.FileInputStream.read(FileInputStream.java:207)
  at Test.main(Test.java:7)
  </code></pre>
  
  <p>My code is</p>
  
  <pre><code>import java.io.*;
  
  final class Test {
      public static final void main(String[] args) {
              try {
                      FileInputStream in = new FileInputStream("/dev/input/js0");
                      System.out.println(in.read());
              } catch(IOException e) {
                      e.printStackTrace();
              }
      }
  }
  </code></pre>
  
  <p>My end goal is to be able to read input from my controller but I can't even seem to read one byte. What am I doing wrong? My user does have read and write access to the file.</p>