Code example for ProtocolException

0
    { 
      super.write( b );
    } 
    catch ( IOException e )
    { 
      throw new ProtocolException();
    } 
  } 
   
  public static void main( String[] args )
  { 
    try 
    { 
      RandomAccessFile raf = new ExceptionlessRandomAccessFile( new File( "file" ), "r" );
      raf.length();
    } 
    catch ( IOException e )
    { 
      e.printStackTrace();
    }