private static int read(int fd,byte[] dst,int position,int len) throws IOException {
  if (VM.VerifyAssertions)   VM._assert(MemoryManager.willNeverMove(dst));
  int bytes=FileSystem.readBytes(fd,dst,position,len);
  if (bytes < 0) {
    throw new IOException("Error code " + Integer.toString(bytes));
  }
  if (bytes == 0) {
    bytes=-1;
  }
  return bytes;
}

private static int read ( int fd , byte [ ] dst , int position , int len ) throws IOException { if ( VM . VerifyAssertions ) VM . _assert ( MemoryManager . willNeverMove ( dst ) ) ; int bytes = FileSystem . readBytes ( fd , dst , position , len ) ; if ( bytes < 0 ) { throw new IOException ( "Error code " + Integer . toString ( bytes ) ) ; } if ( bytes == 0 ) { bytes = - 1 ; } return bytes ; }
use jikesrvm ' s internal read function - the fast way .
