title: Find single line comments in byte array
body: <p>Is it possible to find instances of <code>//</code> in a line read from a file into a byte array and then "snip" from <code>//</code> to the end of the line out? I'm trying </p>
  
  <pre><code>FileInputStream fis = new FileInputStream(file);
  byte[] buffer = new byte[8 * 1024];
  int read;
  
  while ((read = fis.read(buffer)) != -1) 
  {
      for (int i = 0; i &lt; read; i++) 
      {
          if (buffer[i] == '//')
          {
              buffer = buffer[0:i];
          }
      }
  }
  </code></pre>
  
  <p>but I'm getting <code>Invalid character constant</code> at <code>if (buffer[i] == '//')</code> on the <code>'//'</code> part. Am I doing something wrong, or is this just not possible?</p>