home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 May / PCO_5_97.ISO / FilesBBS / OS2 / RDB084R2.ARJ / RDB084R2.ZIP / RXFile.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-03-14  |  24.2 KB  |  1,936 lines

  1. import java.io.DataInputStream;
  2. import java.io.DataOutputStream;
  3. import java.io.File;
  4. import java.io.FileDescriptor;
  5. import java.io.FileInputStream;
  6. import java.io.FileOutputStream;
  7. import java.io.IOException;
  8. import java.io.InputStream;
  9. import java.io.OutputStream;
  10. import java.io.RandomAccessFile;
  11. import java.util.Enumeration;
  12. import java.util.Vector;
  13. import netrexx.lang.Rexx;
  14. import netrexx.lang.RexxParse;
  15. import netrexx.lang.RexxSet;
  16.  
  17. public class RXFile {
  18.    private int iLastErr;
  19.    private long lWriteCurs = 1L;
  20.    private long lReadCurs = 1L;
  21.    private boolean bLastWasRead = true;
  22.    private boolean bRWCurs = false;
  23.    private Rexx rName;
  24.    private RandomAccessFile rafStream;
  25.    private DataInputStream disConsoleIn;
  26.    private DataOutputStream dosConsoleOut;
  27.    private FileDescriptor fdFileDescriptor;
  28.    private FileInputStream fisFileInputStream;
  29.    private FileOutputStream fosFileOutputStream;
  30.    private char cNLn = '\n';
  31.    private char cNLr = '\r';
  32.    private Rexx rNLine;
  33.    private int iNLRN = 1;
  34.    private Rexx stemCursor;
  35.    private String rReady = "READY:";
  36.    private String rCommand = "c";
  37.    private String rOpen = "open";
  38.    private String rSeekAtZero = "seek =0";
  39.    private String rRSeekAtZero = "rseek =0";
  40.    private String rNumeric = "N";
  41.    private String rWSeekAt = "wseek =";
  42.    private String rSeekAt = "seek =";
  43.    private static final Rexx $$8 = new Rexx('0');
  44.    private static final Rexx $$9 = new Rexx('1');
  45.    private static final Rexx $$10 = new Rexx('2');
  46.    private static final Rexx $$11 = new Rexx("");
  47.    private static final char[] $$25 = new char[]{'\u0001', '\n', '\u0002', '\u0000', '\u0001', '\u0000'};
  48.    private static final Rexx $$36 = new Rexx(1);
  49.    private static final Rexx $$37 = new Rexx('+');
  50.    private static final Rexx $$39 = new Rexx('-');
  51.    private static final Rexx $$179 = new Rexx(0);
  52.    private static final Rexx $$219 = new Rexx(13);
  53.    // $FF: renamed from: $0 java.lang.String
  54.    private static final String field_0 = "RXFile.nrx";
  55.  
  56.    public Rexx[] filetree(Rexx var1) {
  57.       Rexx[] var2 = new Rexx[1];
  58.       Object var3 = null;
  59.  
  60.       try {
  61.          var2[0] = this.Err(9, true);
  62.          var5 = new File(var1.toString());
  63.       } catch (NullPointerException var4) {
  64.          return var2;
  65.       }
  66.  
  67.       return this.StringArrayToRexxArray(var5.list());
  68.    }
  69.  
  70.    public Rexx setparms(boolean var1, int var2) {
  71.       if (this.rafStream != null) {
  72.          return this.Err(8, true);
  73.       } else {
  74.          this.bRWCurs = var1;
  75.          if (var2 == 0) {
  76.             this.rNLine = new Rexx(this.cNLn);
  77.             this.iNLRN = 0;
  78.          } else if (var2 == 1) {
  79.             this.rNLine = new Rexx(String.valueOf(this.cNLr) + this.cNLn);
  80.             this.iNLRN = 1;
  81.          } else {
  82.             this.rNLine = new Rexx(this.cNLr);
  83.             this.iNLRN = 2;
  84.          }
  85.  
  86.          return this.Err(0, true);
  87.       }
  88.    }
  89.  
  90.    public Rexx getparms() {
  91.       new Rexx("");
  92.       Rexx var1;
  93.       if (this.bRWCurs) {
  94.          var1 = new Rexx('1');
  95.       } else {
  96.          var1 = new Rexx('0');
  97.       }
  98.  
  99.       if (this.iNLRN == 0) {
  100.          var1 = var1.OpCc((RexxSet)null, $$8);
  101.       } else if (this.iNLRN == 1) {
  102.          var1 = var1.OpCc((RexxSet)null, $$9);
  103.       } else {
  104.          var1 = var1.OpCc((RexxSet)null, $$10);
  105.       }
  106.  
  107.       return var1;
  108.    }
  109.  
  110.    public Rexx addcursor(Rexx var1, long var2) {
  111.       if (var1 == null) {
  112.          return this.Err(1, true);
  113.       } else if (var1.OpEq((RexxSet)null, $$11) | var2 < 0L) {
  114.          return this.Err(1, true);
  115.       } else {
  116.          this.stemCursor.getnode(var1).leaf = new Rexx(var2);
  117.          return this.Err(0, true);
  118.       }
  119.    }
  120.  
  121.    public Rexx getcursor(Rexx var1) {
  122.       if (var1 == null) {
  123.          return this.Err(1, true);
  124.       } else {
  125.          return var1.OpEq((RexxSet)null, $$11) ? this.Err(1, true) : this.stemCursor.getnode(var1).leaf;
  126.       }
  127.    }
  128.  
  129.    public Rexx delcursor(Rexx var1) {
  130.       if (var1 == null) {
  131.          return this.Err(1, true);
  132.       } else if (var1.OpEq((RexxSet)null, $$11)) {
  133.          return this.Err(1, true);
  134.       } else {
  135.          this.stemCursor.getnode(var1).leaf = this.stemCursor;
  136.          return this.Err(0, true);
  137.       }
  138.    }
  139.  
  140.    public Rexx delallcursors() {
  141.       Object var1 = null;
  142.       Rexx var2 = this.stemCursor;
  143.       int var3 = 0;
  144.       Vector var4 = new Vector(100, 1000);
  145.       synchronized(var2){}
  146.  
  147.       try {
  148.          Enumeration var7 = var2.keys();
  149.  
  150.          while(var7.hasMoreElements()) {
  151.             var4.addElement(var7.nextElement());
  152.             if (!var2.testnode((Rexx)var4.elementAt(var3))) {
  153.                var4.removeElementAt(var3);
  154.             } else {
  155.                ++var3;
  156.             }
  157.          }
  158.       } catch (Throwable var9) {
  159.          throw var9;
  160.       }
  161.  
  162.       while(true) {
  163.          --var3;
  164.          if (var3 < 0) {
  165.             return this.Err(0, true);
  166.          }
  167.  
  168.          Rexx var10 = (Rexx)var4.elementAt(var3);
  169.          this.stemCursor.getnode(var10).leaf = this.stemCursor;
  170.       }
  171.    }
  172.  
  173.    public RXFile() {
  174.       Object var1 = null;
  175.       this.iLastErr = -1;
  176.       this.fdFileDescriptor = new FileDescriptor();
  177.       this.fisFileInputStream = new FileInputStream(FileDescriptor.in);
  178.       this.fosFileOutputStream = new FileOutputStream(FileDescriptor.out);
  179.       this.disConsoleIn = new DataInputStream(this.fisFileInputStream);
  180.       this.dosConsoleOut = new DataOutputStream(this.fosFileOutputStream);
  181.       Rexx var2 = new Rexx(System.getProperty("line.separator"));
  182.       if (var2.OpEq((RexxSet)null, new Rexx(String.valueOf(this.cNLr) + this.cNLn))) {
  183.          this.setparms(false, 1);
  184.       } else if (var2.OpEq((RexxSet)null, new Rexx(this.cNLn))) {
  185.          this.setparms(false, 0);
  186.       } else {
  187.          this.setparms(false, 2);
  188.       }
  189.  
  190.       this.stemCursor = null;
  191.       this.stemCursor = new Rexx("Error: no such cursor.");
  192.    }
  193.  
  194.    public RXFile(Rexx var1) {
  195.       Object var2 = null;
  196.       this.iLastErr = -1;
  197.       this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  198.       this.fdFileDescriptor = new FileDescriptor();
  199.       this.fisFileInputStream = new FileInputStream(FileDescriptor.in);
  200.       this.fosFileOutputStream = new FileOutputStream(FileDescriptor.out);
  201.       this.disConsoleIn = new DataInputStream(this.fisFileInputStream);
  202.       this.dosConsoleOut = new DataOutputStream(this.fosFileOutputStream);
  203.       Rexx var3 = new Rexx(System.getProperty("line.separator"));
  204.       if (var3.OpEq((RexxSet)null, new Rexx(String.valueOf(this.cNLr) + this.cNLn))) {
  205.          this.setparms(false, 1);
  206.       } else if (var3.OpEq((RexxSet)null, new Rexx(this.cNLn))) {
  207.          this.setparms(false, 0);
  208.       } else {
  209.          this.setparms(false, 2);
  210.       }
  211.  
  212.       this.stemCursor = null;
  213.       this.stemCursor = new Rexx("Error: no such cursor.");
  214.    }
  215.  
  216.    public RXFile(InputStream var1, OutputStream var2) {
  217.       Object var3 = null;
  218.       this.iLastErr = -1;
  219.       this.disConsoleIn = new DataInputStream(var1);
  220.       this.dosConsoleOut = new DataOutputStream(var2);
  221.       Rexx var4 = new Rexx(System.getProperty("line.separator"));
  222.       if (var4.OpEq((RexxSet)null, new Rexx(String.valueOf(this.cNLr) + this.cNLn))) {
  223.          this.setparms(false, 1);
  224.       } else if (var4.OpEq((RexxSet)null, new Rexx(this.cNLn))) {
  225.          this.setparms(false, 0);
  226.       } else {
  227.          this.setparms(false, 2);
  228.       }
  229.  
  230.       this.stemCursor = null;
  231.       this.stemCursor = new Rexx("Error: no such cursor.");
  232.    }
  233.  
  234.    public RXFile(Rexx var1, Rexx var2, Rexx var3) {
  235.       Object var4 = null;
  236.       this.iLastErr = -1;
  237.       this.fdFileDescriptor = new FileDescriptor();
  238.       this.fisFileInputStream = new FileInputStream(FileDescriptor.in);
  239.       this.fosFileOutputStream = new FileOutputStream(FileDescriptor.out);
  240.       this.disConsoleIn = new DataInputStream(this.fisFileInputStream);
  241.       this.dosConsoleOut = new DataOutputStream(this.fosFileOutputStream);
  242.       Rexx var5 = new Rexx(System.getProperty("line.separator"));
  243.       if (var5.OpEq((RexxSet)null, new Rexx(String.valueOf(this.cNLr) + this.cNLn))) {
  244.          this.setparms(false, 1);
  245.       } else if (var5.OpEq((RexxSet)null, new Rexx(this.cNLn))) {
  246.          this.setparms(false, 0);
  247.       } else {
  248.          this.setparms(false, 2);
  249.       }
  250.  
  251.       this.stemCursor = null;
  252.       this.stemCursor = new Rexx("Error: no such cursor.");
  253.       this.stream(var1, var2, var3);
  254.    }
  255.  
  256.    public Rexx attachtoinputstream(InputStream var1) {
  257.       this.disConsoleIn = new DataInputStream(var1);
  258.       return this.Err(0, true);
  259.    }
  260.  
  261.    public Rexx attachtooutputstream(OutputStream var1) {
  262.       this.dosConsoleOut = new DataOutputStream(var1);
  263.       return this.Err(0, true);
  264.    }
  265.  
  266.    private Rexx Err(int var1, boolean var2) {
  267.       if (var1 != -2) {
  268.          this.iLastErr = var1;
  269.       }
  270.  
  271.       if (var2) {
  272.          if (this.iLastErr == -1) {
  273.             return new Rexx("NOFILEOPEN:");
  274.          } else if (this.iLastErr == 0) {
  275.             return new Rexx(this.rReady);
  276.          } else if (this.iLastErr == 1) {
  277.             return new Rexx("SYNTAX ERROR:");
  278.          } else if (this.iLastErr == 2) {
  279.             return new Rexx("NOTREADY:32");
  280.          } else if (this.iLastErr == 3) {
  281.             return new Rexx("NOTREADY:110");
  282.          } else if (this.iLastErr == 4) {
  283.             return new Rexx("NOTREADY:EOF");
  284.          } else if (this.iLastErr == 5) {
  285.             return new Rexx("ILLEGAL:WRONG ACCESS MODE");
  286.          } else if (this.iLastErr == 6) {
  287.             return new Rexx("ILLEGAL:ALREADY EXISTS");
  288.          } else if (this.iLastErr == 7) {
  289.             return new Rexx("ILLEGAL:CANT ACCESS TARGET");
  290.          } else if (this.iLastErr == 8) {
  291.             return new Rexx("ILLEGAL:ALREADY INIT");
  292.          } else if (this.iLastErr == 9) {
  293.             return new Rexx("NOTREADY:NOSUCHDIRECTORY");
  294.          } else {
  295.             return this.iLastErr == 10 ? new Rexx("NOTREADY:DIRECTORYISEMPTY") : new Rexx("WEIRD ERROR:");
  296.          }
  297.       } else if (this.iLastErr == -1) {
  298.          return new Rexx("NOFILEOPEN:");
  299.       } else if (this.iLastErr == 0) {
  300.          return new Rexx(this.rReady);
  301.       } else if (this.iLastErr == 1) {
  302.          return new Rexx("SYNTAX ERROR:");
  303.       } else if (this.iLastErr == 2) {
  304.          return new Rexx("NOTREADY:");
  305.       } else if (this.iLastErr == 3) {
  306.          return new Rexx("NOTREADY:");
  307.       } else if (this.iLastErr == 4) {
  308.          return new Rexx("NOTREADY:");
  309.       } else if (this.iLastErr == 5) {
  310.          return new Rexx("ILLEGAL:");
  311.       } else if (this.iLastErr == 6) {
  312.          return new Rexx("ILLEGAL:");
  313.       } else if (this.iLastErr == 7) {
  314.          return new Rexx("ILLEGAL:");
  315.       } else if (this.iLastErr == 8) {
  316.          return new Rexx("ILLEGAL:");
  317.       } else if (this.iLastErr == 9) {
  318.          return new Rexx("NOTREADY:");
  319.       } else {
  320.          return this.iLastErr == 10 ? new Rexx("NOTREADY:") : new Rexx("WEIRD ERROR:");
  321.       }
  322.    }
  323.  
  324.    public Rexx stream(Rexx var1, Rexx var2, Rexx var3) {
  325.       char var4 = '\u0000';
  326.       Object var12 = null;
  327.       byte var5 = 0;
  328.       long var6 = 0L;
  329.       long var8 = 0L;
  330.       long var10 = 0L;
  331.       Object var13 = null;
  332.       boolean var14 = false;
  333.       if (var1 == null | var2 == null | var3 == null) {
  334.          return this.Err(1, true);
  335.       } else {
  336.          var4 = var2.strip().left(new Rexx((byte)1)).upper().tochar();
  337.          if (var4 != 'C') {
  338.             return this.Err(1, true);
  339.          } else {
  340.             var3 = var3.strip().upper();
  341.             if (var3.OpEq((RexxSet)null, $$11)) {
  342.                return this.Err(1, true);
  343.             } else {
  344.                Rexx[] var15 = new Rexx[2];
  345.                RexxParse.parse(var3, $$25, var15);
  346.                Rexx var71 = var15[0];
  347.                var3 = var15[1];
  348.                var71 = var71.left(new Rexx((byte)1));
  349.                if (var71.OpEq((RexxSet)null, new Rexx('O'))) {
  350.                   if (var3.OpEq((RexxSet)null, $$11)) {
  351.                      var5 = 3;
  352.                   } else if (var3.OpEq((RexxSet)null, new Rexx("READ"))) {
  353.                      var5 = 1;
  354.                   } else {
  355.                      if (!var3.OpEq((RexxSet)null, new Rexx("WRITE"))) {
  356.                         return this.Err(1, true);
  357.                      }
  358.  
  359.                      var5 = 2;
  360.                   }
  361.                } else if (var71.OpEq((RexxSet)null, new Rexx('Q'))) {
  362.                   if (var3.OpEq((RexxSet)null, new Rexx("SIZE"))) {
  363.                      var5 = 4;
  364.                   } else if (var3.OpEq((RexxSet)null, new Rexx("EXISTS"))) {
  365.                      var5 = 5;
  366.                   } else {
  367.                      if (!var3.OpEq((RexxSet)null, new Rexx("DATETIME"))) {
  368.                         return this.Err(1, true);
  369.                      }
  370.  
  371.                      var5 = 6;
  372.                   }
  373.                } else if (var71.OpEq((RexxSet)null, new Rexx('C'))) {
  374.                   var5 = 7;
  375.                } else if (var71.OpEq((RexxSet)null, new Rexx('S'))) {
  376.                   if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('='))) {
  377.                      var5 = 8;
  378.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  379.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$37)) {
  380.                      var5 = 9;
  381.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  382.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$39)) {
  383.                      var5 = 10;
  384.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpAdd((RexxSet)null, $$36).tolong();
  385.                   } else {
  386.                      if (!var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('<'))) {
  387.                         return this.Err(1, true);
  388.                      }
  389.  
  390.                      var5 = 17;
  391.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).tolong();
  392.                   }
  393.                } else if (var71.OpEq((RexxSet)null, new Rexx('W'))) {
  394.                   if (this.lWriteCurs == -1L | (!this.bRWCurs || false)) {
  395.                      return this.Err(5, true);
  396.                   }
  397.  
  398.                   if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('='))) {
  399.                      var5 = 11;
  400.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  401.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$37)) {
  402.                      var5 = 12;
  403.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  404.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$39)) {
  405.                      var5 = 13;
  406.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpAdd((RexxSet)null, $$36).tolong();
  407.                   } else {
  408.                      if (!var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('<'))) {
  409.                         return this.Err(1, true);
  410.                      }
  411.  
  412.                      var5 = 18;
  413.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).tolong();
  414.                   }
  415.                } else {
  416.                   if (!var71.OpEq((RexxSet)null, new Rexx('R'))) {
  417.                      return this.Err(1, true);
  418.                   }
  419.  
  420.                   if (this.lReadCurs == -1L | (!this.bRWCurs || false)) {
  421.                      return this.Err(5, true);
  422.                   }
  423.  
  424.                   if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('='))) {
  425.                      var5 = 14;
  426.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  427.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$37)) {
  428.                      var5 = 15;
  429.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpSub((RexxSet)null, $$36).tolong();
  430.                   } else if (var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, $$39)) {
  431.                      var5 = 16;
  432.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).OpAdd((RexxSet)null, $$36).tolong();
  433.                   } else {
  434.                      if (!var3.left(new Rexx((byte)1)).OpEq((RexxSet)null, new Rexx('<'))) {
  435.                         return this.Err(1, true);
  436.                      }
  437.  
  438.                      var5 = 19;
  439.                      var6 = var3.right(var3.length().OpSub((RexxSet)null, $$36)).tolong();
  440.                   }
  441.                }
  442.  
  443.                try {
  444.                   var73 = new File(var1.toString());
  445.                   var14 = var73.exists();
  446.                   var10 = var73.length();
  447.                   if ((!var14 || false) & var5 == 5) {
  448.                      return new Rexx("");
  449.                   }
  450.  
  451.                   if ((!var14 || false) & (var5 < 1 | var5 > 3)) {
  452.                      return this.Err(3, true);
  453.                   }
  454.  
  455.                   var1 = new Rexx(var73.getAbsolutePath());
  456.                } catch (NullPointerException var52) {
  457.                   if (var5 != 5) {
  458.                      return this.Err(1, true);
  459.                   }
  460.  
  461.                   return new Rexx("");
  462.                }
  463.  
  464.                if (this.rName != null && var1.OpEq((RexxSet)null, this.rName) & var5 > 0 & var5 < 4) {
  465.                   if (var5 == 1) {
  466.                      if (this.lWriteCurs == -1L) {
  467.                         return this.Err(0, true);
  468.                      }
  469.                   } else if (var5 == 2) {
  470.                      if (this.lReadCurs == -1L) {
  471.                         return this.Err(0, true);
  472.                      }
  473.                   } else if (this.lWriteCurs != -1L & this.lReadCurs != -1L) {
  474.                      return this.Err(0, true);
  475.                   }
  476.                }
  477.  
  478.                if (this.rName != null && var1.OpEq((RexxSet)null, this.rName) & var5 == 7 | (var5 > 0 & var5 < 4 | var5 > 7 & var5 < 20) & var1.OpNotEq((RexxSet)null, this.rName)) {
  479.                   try {
  480.                      this.rafStream.close();
  481.                      this.rafStream = null;
  482.                      this.rName = null;
  483.                   } catch (IOException var51) {
  484.                      return this.Err(100, true);
  485.                   }
  486.                }
  487.  
  488.                if (var5 == 1) {
  489.                   try {
  490.                      this.rafStream = new RandomAccessFile(var73, "r");
  491.                      this.lWriteCurs = -1L;
  492.                      this.lReadCurs = 1L;
  493.                      this.bLastWasRead = true;
  494.                      this.rName = var1;
  495.                   } catch (IOException var34) {
  496.                      return this.Err(2, true);
  497.                   }
  498.                } else if (var5 == 2) {
  499.                   try {
  500.                      this.rafStream = new RandomAccessFile(var73, "rw");
  501.                      this.lWriteCurs = 1L;
  502.                      this.lReadCurs = -1L;
  503.                      this.bLastWasRead = false;
  504.                      this.rName = var1;
  505.                   } catch (IOException var33) {
  506.                      return this.Err(2, true);
  507.                   }
  508.                } else {
  509.                   if (var5 != 3) {
  510.                      if (var5 == 4) {
  511.                         return new Rexx(var73.length());
  512.                      }
  513.  
  514.                      if (var5 == 5) {
  515.                         return var1;
  516.                      }
  517.  
  518.                      if (var5 == 6) {
  519.                         return new Rexx(var73.lastModified());
  520.                      }
  521.  
  522.                      if (var5 == 8) {
  523.                         try {
  524.                            if (this.rafStream == null) {
  525.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  526.                            }
  527.  
  528.                            if (var10 < var6) {
  529.                               var6 = var10;
  530.                            }
  531.  
  532.                            if (var6 < 0L) {
  533.                               var6 = 0L;
  534.                            }
  535.  
  536.                            this.rafStream.seek(var6);
  537.                            if (this.lWriteCurs > -1L) {
  538.                               this.lWriteCurs = var6 + 1L;
  539.                               this.bLastWasRead = false;
  540.                            }
  541.  
  542.                            if (this.lReadCurs != -1L) {
  543.                               this.lReadCurs = var6 + 1L;
  544.                               this.bLastWasRead = true;
  545.                            }
  546.  
  547.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  548.                         } catch (IOException var35) {
  549.                            try {
  550.                               this.rafStream.close();
  551.                               this.rafStream = null;
  552.                               return this.Err(100, true);
  553.                            } catch (IOException var31) {
  554.                               return this.Err(2, true);
  555.                            }
  556.                         }
  557.                      }
  558.  
  559.                      if (var5 == 9) {
  560.                         try {
  561.                            if (this.rafStream == null) {
  562.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  563.                            }
  564.  
  565.                            if (this.lReadCurs != -1L) {
  566.                               try {
  567.                                  var6 += this.lReadCurs;
  568.                                  if (var10 < var6) {
  569.                                     var6 = var10;
  570.                                  }
  571.  
  572.                                  this.rafStream.seek(var6);
  573.                                  this.bLastWasRead = true;
  574.                               } catch (IOException var37) {
  575.                                  try {
  576.                                     this.rafStream.close();
  577.                                     this.rafStream = null;
  578.                                     return this.Err(100, true);
  579.                                  } catch (IOException var30) {
  580.                                     return this.Err(2, true);
  581.                                  }
  582.                               }
  583.                            } else {
  584.                               try {
  585.                                  var6 += this.lWriteCurs;
  586.                                  if (var10 < var6) {
  587.                                     var6 = var10;
  588.                                  }
  589.  
  590.                                  this.rafStream.seek(var6);
  591.                                  this.bLastWasRead = false;
  592.                               } catch (IOException var36) {
  593.                                  try {
  594.                                     this.rafStream.close();
  595.                                     this.rafStream = null;
  596.                                     return this.Err(100, true);
  597.                                  } catch (IOException var29) {
  598.                                     return this.Err(2, true);
  599.                                  }
  600.                               }
  601.                            }
  602.  
  603.                            if (this.lWriteCurs > -1L) {
  604.                               this.lWriteCurs = var6 + 1L;
  605.                            }
  606.  
  607.                            if (this.lReadCurs != -1L) {
  608.                               this.lReadCurs = var6 + 1L;
  609.                            }
  610.  
  611.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  612.                         } catch (IOException var38) {
  613.                            try {
  614.                               this.rafStream.close();
  615.                               this.rafStream = null;
  616.                               return this.Err(100, true);
  617.                            } catch (IOException var28) {
  618.                               return this.Err(2, true);
  619.                            }
  620.                         }
  621.                      }
  622.  
  623.                      if (var5 == 10) {
  624.                         try {
  625.                            if (this.rafStream == null) {
  626.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  627.                            }
  628.  
  629.                            if (this.lReadCurs != -1L) {
  630.                               try {
  631.                                  var6 = this.lReadCurs - var6;
  632.                                  if (var10 < var6) {
  633.                                     var6 = var10;
  634.                                  }
  635.  
  636.                                  if (var6 < 0L) {
  637.                                     var6 = 0L;
  638.                                  }
  639.  
  640.                                  this.rafStream.seek(var6);
  641.                                  this.bLastWasRead = true;
  642.                               } catch (IOException var40) {
  643.                                  try {
  644.                                     this.rafStream.close();
  645.                                     this.rafStream = null;
  646.                                     return this.Err(100, true);
  647.                                  } catch (IOException var27) {
  648.                                     return this.Err(2, true);
  649.                                  }
  650.                               }
  651.                            } else {
  652.                               try {
  653.                                  var6 = this.lWriteCurs - var6;
  654.                                  if (var10 < var6) {
  655.                                     var6 = var10;
  656.                                  }
  657.  
  658.                                  if (var6 < 0L) {
  659.                                     var6 = 0L;
  660.                                  }
  661.  
  662.                                  this.rafStream.seek(var6);
  663.                                  this.bLastWasRead = false;
  664.                               } catch (IOException var39) {
  665.                                  try {
  666.                                     this.rafStream.close();
  667.                                     this.rafStream = null;
  668.                                     return this.Err(100, true);
  669.                                  } catch (IOException var26) {
  670.                                     return this.Err(2, true);
  671.                                  }
  672.                               }
  673.                            }
  674.  
  675.                            if (this.lWriteCurs > -1L) {
  676.                               this.lWriteCurs = var6 + 1L;
  677.                            }
  678.  
  679.                            if (this.lReadCurs != -1L) {
  680.                               this.lReadCurs = var6 + 1L;
  681.                            }
  682.  
  683.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  684.                         } catch (IOException var41) {
  685.                            try {
  686.                               this.rafStream.close();
  687.                               this.rafStream = null;
  688.                               return this.Err(100, true);
  689.                            } catch (IOException var25) {
  690.                               return this.Err(2, true);
  691.                            }
  692.                         }
  693.                      }
  694.  
  695.                      if (var5 == 11) {
  696.                         try {
  697.                            if (this.rafStream == null) {
  698.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  699.                            }
  700.  
  701.                            if (var10 < var6) {
  702.                               var6 = var10;
  703.                            }
  704.  
  705.                            if (var6 < 0L) {
  706.                               var6 = 0L;
  707.                            }
  708.  
  709.                            this.rafStream.seek(var6);
  710.                            this.lWriteCurs = var6 + 1L;
  711.                            this.bLastWasRead = false;
  712.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  713.                         } catch (IOException var42) {
  714.                            try {
  715.                               this.rafStream.close();
  716.                               this.rafStream = null;
  717.                               return this.Err(100, true);
  718.                            } catch (IOException var24) {
  719.                               return this.Err(2, true);
  720.                            }
  721.                         }
  722.                      }
  723.  
  724.                      if (var5 == 12) {
  725.                         try {
  726.                            if (this.rafStream == null) {
  727.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  728.                            }
  729.  
  730.                            var6 += this.lWriteCurs;
  731.                            if (var10 < var6) {
  732.                               var6 = var10;
  733.                            }
  734.  
  735.                            this.rafStream.seek(var6);
  736.                            this.lWriteCurs = var6 + 1L;
  737.                            this.bLastWasRead = false;
  738.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  739.                         } catch (IOException var43) {
  740.                            try {
  741.                               this.rafStream.close();
  742.                               this.rafStream = null;
  743.                               return this.Err(100, true);
  744.                            } catch (IOException var23) {
  745.                               return this.Err(2, true);
  746.                            }
  747.                         }
  748.                      }
  749.  
  750.                      if (var5 == 13) {
  751.                         try {
  752.                            if (this.rafStream == null) {
  753.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  754.                            }
  755.  
  756.                            var6 = this.lWriteCurs - var6;
  757.                            if (var10 < var6) {
  758.                               var6 = var10;
  759.                            }
  760.  
  761.                            if (var6 < 0L) {
  762.                               var6 = 0L;
  763.                            }
  764.  
  765.                            this.rafStream.seek(var6);
  766.                            this.lWriteCurs = var6 + 1L;
  767.                            this.bLastWasRead = false;
  768.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  769.                         } catch (IOException var44) {
  770.                            try {
  771.                               this.rafStream.close();
  772.                               this.rafStream = null;
  773.                               return this.Err(100, true);
  774.                            } catch (IOException var22) {
  775.                               return this.Err(2, true);
  776.                            }
  777.                         }
  778.                      }
  779.  
  780.                      if (var5 == 14) {
  781.                         try {
  782.                            if (this.rafStream == null) {
  783.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  784.                            }
  785.  
  786.                            if (var10 < var6) {
  787.                               var6 = var10;
  788.                            }
  789.  
  790.                            if (var6 < 0L) {
  791.                               var6 = 0L;
  792.                            }
  793.  
  794.                            this.rafStream.seek(var6);
  795.                            this.lReadCurs = var6 + 1L;
  796.                            this.bLastWasRead = true;
  797.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  798.                         } catch (IOException var45) {
  799.                            try {
  800.                               this.rafStream.close();
  801.                               this.rafStream = null;
  802.                               return this.Err(100, true);
  803.                            } catch (IOException var21) {
  804.                               return this.Err(2, true);
  805.                            }
  806.                         }
  807.                      }
  808.  
  809.                      if (var5 == 15) {
  810.                         try {
  811.                            if (this.rafStream == null) {
  812.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  813.                            }
  814.  
  815.                            var6 += this.lReadCurs;
  816.                            if (var10 < var6) {
  817.                               var6 = var10;
  818.                            }
  819.  
  820.                            this.rafStream.seek(var6);
  821.                            this.lReadCurs = var6 + 1L;
  822.                            this.bLastWasRead = true;
  823.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  824.                         } catch (IOException var46) {
  825.                            try {
  826.                               this.rafStream.close();
  827.                               this.rafStream = null;
  828.                               return this.Err(100, true);
  829.                            } catch (IOException var20) {
  830.                               return this.Err(2, true);
  831.                            }
  832.                         }
  833.                      }
  834.  
  835.                      if (var5 == 16) {
  836.                         try {
  837.                            if (this.rafStream == null) {
  838.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  839.                            }
  840.  
  841.                            var6 = this.lReadCurs - var6;
  842.                            if (var10 < var6) {
  843.                               var6 = var10;
  844.                            }
  845.  
  846.                            if (var6 < 0L) {
  847.                               var6 = 0L;
  848.                            }
  849.  
  850.                            this.rafStream.seek(var6);
  851.                            this.lReadCurs = var6 + 1L;
  852.                            this.bLastWasRead = true;
  853.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  854.                         } catch (IOException var47) {
  855.                            try {
  856.                               this.rafStream.close();
  857.                               this.rafStream = null;
  858.                               return this.Err(100, true);
  859.                            } catch (IOException var19) {
  860.                               return this.Err(2, true);
  861.                            }
  862.                         }
  863.                      }
  864.  
  865.                      if (var5 == 17) {
  866.                         try {
  867.                            if (this.rafStream == null) {
  868.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  869.                            }
  870.  
  871.                            var8 = this.rafStream.length();
  872.                            var6 = var8 - var6;
  873.                            if (var6 < 0L) {
  874.                               var6 = 0L;
  875.                            }
  876.  
  877.                            this.rafStream.seek(var6);
  878.                            if (this.lWriteCurs > -1L) {
  879.                               this.lWriteCurs = var6 + 1L;
  880.                               this.bLastWasRead = false;
  881.                            }
  882.  
  883.                            if (this.lReadCurs != -1L) {
  884.                               this.lReadCurs = var6 + 1L;
  885.                               this.bLastWasRead = true;
  886.                            }
  887.  
  888.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  889.                         } catch (IOException var48) {
  890.                            try {
  891.                               this.rafStream.close();
  892.                               this.rafStream = null;
  893.                               return this.Err(100, true);
  894.                            } catch (IOException var18) {
  895.                               return this.Err(2, true);
  896.                            }
  897.                         }
  898.                      }
  899.  
  900.                      if (var5 == 18) {
  901.                         try {
  902.                            if (this.rafStream == null) {
  903.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  904.                            }
  905.  
  906.                            var8 = this.rafStream.length();
  907.                            var6 = var8 - var6;
  908.                            if (var6 < 0L) {
  909.                               var6 = 0L;
  910.                            }
  911.  
  912.                            this.rafStream.seek(var6);
  913.                            this.lReadCurs = var6 + 1L;
  914.                            this.bLastWasRead = true;
  915.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  916.                         } catch (IOException var49) {
  917.                            try {
  918.                               this.rafStream.close();
  919.                               this.rafStream = null;
  920.                               return this.Err(100, true);
  921.                            } catch (IOException var17) {
  922.                               return this.Err(2, true);
  923.                            }
  924.                         }
  925.                      }
  926.  
  927.                      if (var5 == 19) {
  928.                         try {
  929.                            if (this.rafStream == null) {
  930.                               this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  931.                            }
  932.  
  933.                            var8 = this.rafStream.length();
  934.                            var6 = var8 - var6;
  935.                            if (var6 < 0L) {
  936.                               var6 = 0L;
  937.                            }
  938.  
  939.                            this.rafStream.seek(var6);
  940.                            this.lWriteCurs = var6 + 1L;
  941.                            this.bLastWasRead = false;
  942.                            return new Rexx(this.rafStream.getFilePointer() + 1L);
  943.                         } catch (IOException var50) {
  944.                            try {
  945.                               this.rafStream.close();
  946.                               this.rafStream = null;
  947.                               return this.Err(100, true);
  948.                            } catch (IOException var16) {
  949.                               return this.Err(2, true);
  950.                            }
  951.                         }
  952.                      }
  953.  
  954.                      return this.Err(0, true);
  955.                   }
  956.  
  957.                   try {
  958.                      this.rafStream = new RandomAccessFile(var73, "rw");
  959.                      if (this.bRWCurs) {
  960.                         this.lWriteCurs = 1L;
  961.                      } else {
  962.                         this.lWriteCurs = -2L;
  963.                      }
  964.  
  965.                      this.lReadCurs = 1L;
  966.                      this.bLastWasRead = true;
  967.                      this.rName = var1;
  968.                   } catch (IOException var32) {
  969.                      return this.Err(2, true);
  970.                   }
  971.                }
  972.  
  973.                return this.Err(0, true);
  974.             }
  975.          }
  976.       }
  977.    }
  978.  
  979.    public Rexx stream(Rexx var1, Rexx var2) {
  980.       return this.rafStream == null ? this.Err(-1, true) : this.stream(this.rName, var1, var2);
  981.    }
  982.  
  983.    public Rexx stream(Rexx var1) {
  984.       if (this.rafStream == null) {
  985.          return this.Err(-1, true);
  986.       } else {
  987.          var1 = var1.strip().left(new Rexx((byte)1)).upper();
  988.          if (var1.OpEq((RexxSet)null, new Rexx('D'))) {
  989.             return this.Err(-2, true);
  990.          } else {
  991.             return var1.OpEq((RexxSet)null, new Rexx('S')) ? this.Err(-2, false) : this.Err(1, true);
  992.          }
  993.       }
  994.    }
  995.  
  996.    public Rexx delete(Rexx var1) {
  997.       Object var2 = null;
  998.  
  999.       try {
  1000.          var4 = new File(var1.toString());
  1001.       } catch (NullPointerException var3) {
  1002.          return this.Err(1, true);
  1003.       }
  1004.  
  1005.       return var4.delete() ? this.Err(0, true) : this.Err(3, true);
  1006.    }
  1007.  
  1008.    public Rexx rename(Rexx var1, Rexx var2) {
  1009.       Object var3 = null;
  1010.       Object var4 = null;
  1011.  
  1012.       try {
  1013.          var6 = new File(var1.toString());
  1014.          var7 = new File(var2.toString());
  1015.       } catch (NullPointerException var5) {
  1016.          return this.Err(1, true);
  1017.       }
  1018.  
  1019.       if (var6.exists() && true) {
  1020.          if (var7.exists()) {
  1021.             return this.Err(3, true);
  1022.          } else {
  1023.             return var6.renameTo(var7) ? this.Err(0, true) : this.Err(7, true);
  1024.          }
  1025.       } else {
  1026.          return this.Err(6, true);
  1027.       }
  1028.    }
  1029.  
  1030.    public Rexx mkdir(Rexx var1) {
  1031.       Object var2 = null;
  1032.  
  1033.       try {
  1034.          var4 = new File(var1.toString());
  1035.       } catch (NullPointerException var3) {
  1036.          return this.Err(1, true);
  1037.       }
  1038.  
  1039.       return var4.mkdir() ? this.Err(0, true) : this.Err(7, true);
  1040.    }
  1041.  
  1042.    public Rexx mkdirs(Rexx var1) {
  1043.       Object var2 = null;
  1044.  
  1045.       try {
  1046.          var4 = new File(var1.toString());
  1047.       } catch (NullPointerException var3) {
  1048.          return this.Err(1, true);
  1049.       }
  1050.  
  1051.       return var4.mkdirs() ? this.Err(0, true) : this.Err(7, true);
  1052.    }
  1053.  
  1054.    public Rexx[] StringArrayToRexxArray(String[] var1) {
  1055.       int var2 = 0;
  1056.       Rexx[] var3 = new Rexx[1];
  1057.       boolean var4 = false;
  1058.       var3[0] = this.Err(9, true);
  1059.       if (var1 == null) {
  1060.          return var3;
  1061.       } else {
  1062.          try {
  1063.             if ((new Rexx(var1[0])).OpEq((RexxSet)null, $$11)) {
  1064.                return var3;
  1065.             }
  1066.          } catch (ArrayIndexOutOfBoundsException var7) {
  1067.             var3[0] = this.Err(10, true);
  1068.             return var3;
  1069.          }
  1070.  
  1071.          try {
  1072.             boolean var5 = true;
  1073.  
  1074.             while(true) {
  1075.                if (var5) {
  1076.                   var5 = false;
  1077.                } else if (var1[var2] == null | var4) {
  1078.                   break;
  1079.                }
  1080.  
  1081.                ++var2;
  1082.             }
  1083.          } catch (ArrayIndexOutOfBoundsException var6) {
  1084.             var4 = true;
  1085.          }
  1086.  
  1087.          return this.sArrayTor(var1, var2);
  1088.       }
  1089.    }
  1090.  
  1091.    private Rexx[] sArrayTor(String[] var1, int var2) {
  1092.       boolean var3 = false;
  1093.       Rexx[] var4 = new Rexx[var2];
  1094.       if (var2 == 1) {
  1095.          var4[0] = new Rexx(var1[0]);
  1096.       } else {
  1097.          int var5 = var2 - 1;
  1098.  
  1099.          for(int var6 = 0; var6 <= var5; ++var6) {
  1100.             var4[var6] = new Rexx(var1[var6]);
  1101.          }
  1102.       }
  1103.  
  1104.       return var4;
  1105.    }
  1106.  
  1107.    public Rexx properties(Rexx var1) {
  1108.       Object var2 = null;
  1109.       Object var3 = null;
  1110.  
  1111.       try {
  1112.          File var5 = new File(var1.toString());
  1113.          Rexx var6;
  1114.          if (var5.isFile()) {
  1115.             var6 = new Rexx('f');
  1116.          } else {
  1117.             var6 = new Rexx('-');
  1118.          }
  1119.  
  1120.          if (var5.isDirectory()) {
  1121.             var6 = var6.OpCc((RexxSet)null, new Rexx('d'));
  1122.          } else {
  1123.             var6 = var6.OpCc((RexxSet)null, $$39);
  1124.          }
  1125.  
  1126.          if (var5.canRead()) {
  1127.             var6 = var6.OpCc((RexxSet)null, new Rexx('r'));
  1128.          } else {
  1129.             var6 = var6.OpCc((RexxSet)null, $$39);
  1130.          }
  1131.  
  1132.          if (var5.canWrite()) {
  1133.             var6 = var6.OpCc((RexxSet)null, new Rexx('w'));
  1134.          } else {
  1135.             var6 = var6.OpCc((RexxSet)null, $$39);
  1136.          }
  1137.  
  1138.          return var6;
  1139.       } catch (NullPointerException var4) {
  1140.          return this.Err(3, true);
  1141.       }
  1142.    }
  1143.  
  1144.    private Rexx synch(boolean var1) {
  1145.       if (this.bRWCurs && true) {
  1146.          if (var1) {
  1147.             if (!this.bLastWasRead || false) {
  1148.                try {
  1149.                   if (this.lReadCurs == -1L) {
  1150.                      return this.Err(5, true);
  1151.                   }
  1152.  
  1153.                   this.rafStream.seek(this.lReadCurs);
  1154.                } catch (IOException var5) {
  1155.                   try {
  1156.                      this.rafStream.close();
  1157.                      this.rafStream = null;
  1158.                      return this.Err(2, true);
  1159.                   } catch (IOException var3) {
  1160.                      this.rafStream = null;
  1161.                      return this.Err(2, true);
  1162.                   }
  1163.                }
  1164.             }
  1165.          } else if (this.bLastWasRead) {
  1166.             try {
  1167.                if (this.lWriteCurs == -1L) {
  1168.                   return this.Err(5, true);
  1169.                }
  1170.  
  1171.                this.rafStream.seek(this.lWriteCurs);
  1172.             } catch (IOException var4) {
  1173.                try {
  1174.                   this.rafStream.close();
  1175.                   this.rafStream = null;
  1176.                   return this.Err(2, true);
  1177.                } catch (IOException var2) {
  1178.                   this.rafStream = null;
  1179.                   return this.Err(2, true);
  1180.                }
  1181.             }
  1182.          }
  1183.  
  1184.          return this.Err(0, true);
  1185.       } else {
  1186.          return this.Err(0, true);
  1187.       }
  1188.    }
  1189.  
  1190.    public Rexx chars(Rexx var1) {
  1191.       Object var2 = null;
  1192.       Rexx var3 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1193.       return var3.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var3 : this.chars();
  1194.    }
  1195.  
  1196.    public Rexx chars() {
  1197.       int var2 = 0;
  1198.       Object var1 = null;
  1199.       if (this.rafStream != null) {
  1200.          if (this.lReadCurs != -1L) {
  1201.             try {
  1202.                if (this.lWriteCurs > -1L) {
  1203.                   Rexx var6 = this.synch(true);
  1204.                   if (var6.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1205.                      return var6;
  1206.                   }
  1207.  
  1208.                   this.bLastWasRead = true;
  1209.                }
  1210.  
  1211.                return new Rexx(this.rafStream.length() - this.lReadCurs + 1L);
  1212.             } catch (IOException var4) {
  1213.                try {
  1214.                   this.rafStream.close();
  1215.                   this.rafStream = null;
  1216.                   return this.Err(2, true);
  1217.                } catch (IOException var3) {
  1218.                   this.rafStream = null;
  1219.                   return this.Err(2, true);
  1220.                }
  1221.             }
  1222.          } else {
  1223.             return this.Err(7, true);
  1224.          }
  1225.       } else {
  1226.          try {
  1227.             var2 = this.disConsoleIn.available();
  1228.             return new Rexx(var2);
  1229.          } catch (IOException var5) {
  1230.             return new Rexx((byte)0);
  1231.          }
  1232.       }
  1233.    }
  1234.  
  1235.    public Rexx lines(Rexx var1) {
  1236.       Object var2 = null;
  1237.       Rexx var3 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1238.       return var3.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var3 : this.lines();
  1239.    }
  1240.  
  1241.    public Rexx lines() {
  1242.       Object var1 = null;
  1243.       Rexx var2 = this.chars();
  1244.       if (var2.datatype(new Rexx("Number")).OpEq((RexxSet)null, $$36)) {
  1245.          return var2.OpNotEq((RexxSet)null, $$179) ? new Rexx((byte)1) : new Rexx((byte)0);
  1246.       } else {
  1247.          return var2;
  1248.       }
  1249.    }
  1250.  
  1251.    public Rexx charin(Rexx var1) {
  1252.       int var4 = 0;
  1253.       Object var2 = null;
  1254.       Object var3 = null;
  1255.       Rexx var7 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1256.       if (var7.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1257.          return var7;
  1258.       } else {
  1259.          try {
  1260.             if (this.lReadCurs == -1L) {
  1261.                return this.Err(7, true);
  1262.             } else {
  1263.                if (this.lWriteCurs > -1L) {
  1264.                   Rexx var8 = this.synch(true);
  1265.                   if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1266.                      return var8;
  1267.                   }
  1268.                }
  1269.  
  1270.                var4 = this.rafStream.read();
  1271.                if (var4 == -1) {
  1272.                   this.Err(4, true);
  1273.                   return this.Err(4, true);
  1274.                } else {
  1275.                   ++this.lReadCurs;
  1276.                   this.bLastWasRead = true;
  1277.                   return new Rexx((char)var4);
  1278.                }
  1279.             }
  1280.          } catch (IOException var6) {
  1281.             try {
  1282.                this.rafStream.close();
  1283.                this.rafStream = null;
  1284.                return this.Err(2, true);
  1285.             } catch (IOException var5) {
  1286.                this.rafStream = null;
  1287.                return this.Err(2, true);
  1288.             }
  1289.          }
  1290.       }
  1291.    }
  1292.  
  1293.    public Rexx charin() {
  1294.       int var2 = 0;
  1295.       Object var1 = null;
  1296.       if (this.rafStream == null) {
  1297.          try {
  1298.             return new Rexx((char)this.disConsoleIn.readByte());
  1299.          } catch (IOException var4) {
  1300.             return this.Err(2, true);
  1301.          }
  1302.       } else {
  1303.          try {
  1304.             if (this.lReadCurs == -1L) {
  1305.                return this.Err(7, true);
  1306.             } else {
  1307.                if (this.lWriteCurs > -1L) {
  1308.                   Rexx var6 = this.synch(true);
  1309.                   if (var6.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1310.                      return var6;
  1311.                   }
  1312.                }
  1313.  
  1314.                var2 = this.rafStream.read();
  1315.                if (var2 == -1) {
  1316.                   this.Err(4, true);
  1317.                   return this.Err(4, true);
  1318.                } else {
  1319.                   ++this.lReadCurs;
  1320.                   this.bLastWasRead = true;
  1321.                   return new Rexx((char)var2);
  1322.                }
  1323.             }
  1324.          } catch (IOException var5) {
  1325.             try {
  1326.                this.rafStream.close();
  1327.                this.rafStream = null;
  1328.                return this.Err(2, true);
  1329.             } catch (IOException var3) {
  1330.                this.rafStream = null;
  1331.                return this.Err(2, true);
  1332.             }
  1333.          }
  1334.       }
  1335.    }
  1336.  
  1337.    public Rexx charin(Rexx var1, long var2, int var4) {
  1338.       Object var5 = null;
  1339.       Object var6 = null;
  1340.       byte[] var7 = new byte[var4];
  1341.       Rexx var10 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1342.       if (var10.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1343.          return var10;
  1344.       } else if (this.lReadCurs == -1L) {
  1345.          return this.Err(7, true);
  1346.       } else if (var2 < 0L | var4 < 0) {
  1347.          return this.Err(1, true);
  1348.       } else {
  1349.          if (var2 != 0L) {
  1350.             if (this.lWriteCurs > -1L) {
  1351.                Rexx var11 = this.synch(true);
  1352.                if (var11.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1353.                   return var11;
  1354.                }
  1355.             } else if (this.bRWCurs) {
  1356.                Rexx var12 = this.stream(new Rexx(this.rCommand), new Rexx("rseek =" + String.valueOf(var2)));
  1357.                if (var12.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1358.                   return var12;
  1359.                }
  1360.             } else {
  1361.                Rexx var13 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAt + String.valueOf(var2)));
  1362.                if (var13.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1363.                   return var13;
  1364.                }
  1365.             }
  1366.          }
  1367.  
  1368.          new Rexx("");
  1369.  
  1370.          try {
  1371.             this.rafStream.read(var7, 0, var4);
  1372.             Rexx var14 = new Rexx(new String(var7, 0));
  1373.             this.lReadCurs = (new Rexx(this.lReadCurs)).OpAdd((RexxSet)null, var14.length()).tolong();
  1374.             this.bLastWasRead = true;
  1375.             return var14;
  1376.          } catch (IOException var9) {
  1377.             try {
  1378.                this.rafStream.close();
  1379.                this.rafStream = null;
  1380.                return this.Err(2, true);
  1381.             } catch (IOException var8) {
  1382.                this.rafStream = null;
  1383.                return this.Err(2, true);
  1384.             }
  1385.          }
  1386.       }
  1387.    }
  1388.  
  1389.    public Rexx charin(long var1, int var3) {
  1390.       Object var4 = null;
  1391.       byte[] var5 = new byte[var3];
  1392.       if (this.rafStream == null) {
  1393.          return this.Err(-1, true);
  1394.       } else if (this.lReadCurs == -1L) {
  1395.          return this.Err(7, true);
  1396.       } else if (var1 < 0L | var3 < 0) {
  1397.          return this.Err(1, true);
  1398.       } else {
  1399.          if (var1 != 0L) {
  1400.             if (this.lWriteCurs > -1L) {
  1401.                Rexx var8 = this.synch(true);
  1402.                if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1403.                   return var8;
  1404.                }
  1405.             } else if (this.bRWCurs) {
  1406.                Rexx var9 = this.stream(new Rexx(this.rCommand), new Rexx("rseek =" + String.valueOf(var1)));
  1407.                if (var9.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1408.                   return var9;
  1409.                }
  1410.             } else {
  1411.                Rexx var10 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAt + String.valueOf(var1)));
  1412.                if (var10.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1413.                   return var10;
  1414.                }
  1415.             }
  1416.          }
  1417.  
  1418.          try {
  1419.             this.rafStream.read(var5, 0, var3);
  1420.             Rexx var11 = new Rexx(new String(var5, 0));
  1421.             this.lReadCurs = (new Rexx(this.lReadCurs)).OpAdd((RexxSet)null, var11.length()).tolong();
  1422.             this.bLastWasRead = true;
  1423.             return var11;
  1424.          } catch (IOException var7) {
  1425.             try {
  1426.                this.rafStream.close();
  1427.                this.rafStream = null;
  1428.                return this.Err(2, true);
  1429.             } catch (IOException var6) {
  1430.                this.rafStream = null;
  1431.                return this.Err(2, true);
  1432.             }
  1433.          }
  1434.       }
  1435.    }
  1436.  
  1437.    public Rexx linein(Rexx var1, int var2, int var3) {
  1438.       Object var4 = null;
  1439.       Object var5 = null;
  1440.       int var6 = 0;
  1441.       long var7 = 0L;
  1442.       Rexx var12 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1443.       if (var12.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1444.          return var12;
  1445.       } else if (var2 != 0 & var2 != 1 | var3 != 0 & var3 != 1) {
  1446.          return this.Err(1, true);
  1447.       } else if (this.rafStream == null) {
  1448.          return this.Err(-1, true);
  1449.       } else {
  1450.          if (var2 == 0) {
  1451.             Rexx var15;
  1452.             if (this.bRWCurs && true) {
  1453.                var15 = this.stream(new Rexx(this.rCommand), new Rexx(this.rRSeekAtZero));
  1454.             } else {
  1455.                var15 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAtZero));
  1456.             }
  1457.  
  1458.             if (var15.datatype(new Rexx(this.rNumeric)).OpEq((RexxSet)null, $$179)) {
  1459.                return var15;
  1460.             }
  1461.          }
  1462.  
  1463.          if (var3 == 0) {
  1464.             return new Rexx("");
  1465.          } else if (this.rafStream == null) {
  1466.             try {
  1467.                return new Rexx(this.disConsoleIn.readLine());
  1468.             } catch (IOException var10) {
  1469.                return this.Err(2, true);
  1470.             }
  1471.          } else if (this.lReadCurs != -1L) {
  1472.             try {
  1473.                if (this.lWriteCurs > -1L) {
  1474.                   var12 = this.synch(true);
  1475.                   if (var12.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1476.                      return var12;
  1477.                   }
  1478.                }
  1479.  
  1480.                var12 = new Rexx(this.rafStream.readLine());
  1481.                var6 = var12.length().toint();
  1482.                this.lReadCurs = this.lReadCurs + (long)var6 + 1L;
  1483.                var7 = this.rafStream.length();
  1484.                if (this.lReadCurs > var7 + 1L) {
  1485.                   this.lReadCurs = var7 + 1L;
  1486.                }
  1487.  
  1488.                this.bLastWasRead = true;
  1489.                if (var6 == 0) {
  1490.                   return new Rexx("");
  1491.                } else {
  1492.                   return var12.right(new Rexx((byte)1)).c2d().OpEq((RexxSet)null, $$219) ? var12.left(new Rexx(var6 - 1)) : var12;
  1493.                }
  1494.             } catch (IOException var11) {
  1495.                try {
  1496.                   this.rafStream.close();
  1497.                   this.rafStream = null;
  1498.                   return this.Err(2, true);
  1499.                } catch (IOException var9) {
  1500.                   this.rafStream = null;
  1501.                   return this.Err(2, true);
  1502.                }
  1503.             }
  1504.          } else {
  1505.             return this.Err(7, true);
  1506.          }
  1507.       }
  1508.    }
  1509.  
  1510.    public Rexx linein(int var1, int var2) {
  1511.       Object var3 = null;
  1512.       Object var4 = null;
  1513.       int var5 = 0;
  1514.       long var6 = 0L;
  1515.       if (var1 != 0 & var1 != 1 | var2 != 0 & var2 != 1) {
  1516.          return this.Err(1, true);
  1517.       } else if (this.rafStream == null) {
  1518.          return this.Err(-1, true);
  1519.       } else {
  1520.          if (var1 == 0) {
  1521.             Rexx var11;
  1522.             if (this.bRWCurs && true) {
  1523.                var11 = this.stream(new Rexx(this.rCommand), new Rexx(this.rRSeekAtZero));
  1524.             } else {
  1525.                var11 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAtZero));
  1526.             }
  1527.  
  1528.             if (var11.datatype(new Rexx(this.rNumeric)).OpEq((RexxSet)null, $$179)) {
  1529.                return var11;
  1530.             }
  1531.          }
  1532.  
  1533.          if (var2 == 0) {
  1534.             return new Rexx("");
  1535.          } else if (this.rafStream == null) {
  1536.             try {
  1537.                return new Rexx(this.disConsoleIn.readLine());
  1538.             } catch (IOException var9) {
  1539.                return this.Err(2, true);
  1540.             }
  1541.          } else if (this.lReadCurs != -1L) {
  1542.             try {
  1543.                if (this.lWriteCurs > -1L) {
  1544.                   Rexx var12 = this.synch(true);
  1545.                   if (var12.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1546.                      return var12;
  1547.                   }
  1548.                }
  1549.  
  1550.                Rexx var13 = new Rexx(this.rafStream.readLine());
  1551.                var5 = var13.length().toint();
  1552.                this.lReadCurs = this.lReadCurs + (long)var5 + 1L;
  1553.                var6 = this.rafStream.length();
  1554.                if (this.lReadCurs > var6 + 1L) {
  1555.                   this.lReadCurs = var6 + 1L;
  1556.                }
  1557.  
  1558.                this.bLastWasRead = true;
  1559.                if (var5 == 0) {
  1560.                   return new Rexx("");
  1561.                } else {
  1562.                   return var13.right(new Rexx((byte)1)).c2d().OpEq((RexxSet)null, $$219) ? var13.left(new Rexx(var5 - 1)) : var13;
  1563.                }
  1564.             } catch (IOException var10) {
  1565.                try {
  1566.                   this.rafStream.close();
  1567.                   this.rafStream = null;
  1568.                   return this.Err(2, true);
  1569.                } catch (IOException var8) {
  1570.                   this.rafStream = null;
  1571.                   return this.Err(2, true);
  1572.                }
  1573.             }
  1574.          } else {
  1575.             return this.Err(7, true);
  1576.          }
  1577.       }
  1578.    }
  1579.  
  1580.    public Rexx linein() {
  1581.       Object var1 = null;
  1582.       int var2 = 0;
  1583.       long var3 = 0L;
  1584.       if (this.rafStream == null) {
  1585.          try {
  1586.             return new Rexx(this.disConsoleIn.readLine());
  1587.          } catch (IOException var6) {
  1588.             return this.Err(2, true);
  1589.          }
  1590.       } else if (this.lReadCurs != -1L) {
  1591.          try {
  1592.             if (this.lWriteCurs > -1L) {
  1593.                Rexx var8 = this.synch(true);
  1594.                if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1595.                   return var8;
  1596.                }
  1597.             }
  1598.  
  1599.             Rexx var9 = new Rexx(this.rafStream.readLine());
  1600.             var2 = var9.length().toint();
  1601.             this.lReadCurs = this.lReadCurs + (long)var2 + 1L;
  1602.             var3 = this.rafStream.length();
  1603.             if (this.lReadCurs > var3 + 1L) {
  1604.                this.lReadCurs = var3 + 1L;
  1605.             }
  1606.  
  1607.             this.bLastWasRead = true;
  1608.             if (var2 == 0) {
  1609.                return new Rexx("");
  1610.             } else {
  1611.                return var9.right(new Rexx((byte)1)).c2d().OpEq((RexxSet)null, $$219) ? var9.left(new Rexx(var2 - 1)) : var9;
  1612.             }
  1613.          } catch (IOException var7) {
  1614.             try {
  1615.                this.rafStream.close();
  1616.                this.rafStream = null;
  1617.                return this.Err(2, true);
  1618.             } catch (IOException var5) {
  1619.                this.rafStream = null;
  1620.                return this.Err(2, true);
  1621.             }
  1622.          }
  1623.       } else {
  1624.          return this.Err(7, true);
  1625.       }
  1626.    }
  1627.  
  1628.    public Rexx linein(Rexx var1) {
  1629.       Object var2 = null;
  1630.       int var3 = 0;
  1631.       long var4 = 0L;
  1632.       Rexx var8 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1633.       if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1634.          return var8;
  1635.       } else if (this.lReadCurs != -1L) {
  1636.          try {
  1637.             if (this.lWriteCurs > -1L) {
  1638.                var8 = this.synch(true);
  1639.                if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1640.                   return var8;
  1641.                }
  1642.             }
  1643.  
  1644.             var8 = new Rexx(this.rafStream.readLine());
  1645.             var3 = var8.length().toint();
  1646.             this.lReadCurs = this.lReadCurs + (long)var3 + 1L;
  1647.             var4 = this.rafStream.length();
  1648.             if (this.lReadCurs > var4 + 1L) {
  1649.                this.lReadCurs = var4 + 1L;
  1650.             }
  1651.  
  1652.             this.bLastWasRead = true;
  1653.             if (var3 == 0) {
  1654.                return new Rexx("");
  1655.             } else {
  1656.                return var8.right(new Rexx((byte)1)).c2d().OpEq((RexxSet)null, $$219) ? var8.left(new Rexx(var3 - 1)) : var8;
  1657.             }
  1658.          } catch (IOException var7) {
  1659.             try {
  1660.                this.rafStream.close();
  1661.                this.rafStream = null;
  1662.                return this.Err(2, true);
  1663.             } catch (IOException var6) {
  1664.                this.rafStream = null;
  1665.                return this.Err(2, true);
  1666.             }
  1667.          }
  1668.       } else {
  1669.          return this.Err(7, true);
  1670.       }
  1671.    }
  1672.  
  1673.    public Rexx charout(Rexx var1, long var2) {
  1674.       Object var4 = null;
  1675.       Object var5 = null;
  1676.       if (this.rafStream == null) {
  1677.          return this.Err(-1, true);
  1678.       } else if (this.lWriteCurs == -1L) {
  1679.          return this.Err(7, true);
  1680.       } else if (var2 < 0L) {
  1681.          return this.Err(1, true);
  1682.       } else {
  1683.          if (var1 == null) {
  1684.             var1 = new Rexx("");
  1685.          }
  1686.  
  1687.          if (this.lReadCurs != -1L) {
  1688.             Rexx var9 = this.synch(false);
  1689.             if (var9.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1690.                return var9;
  1691.             }
  1692.          }
  1693.  
  1694.          String var8 = var1.toString();
  1695.          if (var2 != 0L) {
  1696.             Rexx var10;
  1697.             if (this.bRWCurs) {
  1698.                var10 = this.stream(new Rexx(this.rCommand), new Rexx(this.rWSeekAt + String.valueOf(var2)));
  1699.                if (var10.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1700.                   return var10;
  1701.                }
  1702.             } else {
  1703.                var10 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAt + String.valueOf(var2)));
  1704.             }
  1705.  
  1706.             if (var10.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1707.                return var10;
  1708.             }
  1709.          }
  1710.  
  1711.          try {
  1712.             this.rafStream.writeBytes(var8);
  1713.             if (this.bRWCurs) {
  1714.                this.lWriteCurs += (long)var8.length();
  1715.             } else if (this.lWriteCurs == -2L) {
  1716.                this.lReadCurs += (long)var8.length();
  1717.             } else {
  1718.                this.lWriteCurs += (long)var8.length();
  1719.             }
  1720.  
  1721.             this.bLastWasRead = false;
  1722.          } catch (IOException var7) {
  1723.             try {
  1724.                this.rafStream.close();
  1725.                this.rafStream = null;
  1726.                return this.Err(2, true);
  1727.             } catch (IOException var6) {
  1728.                this.rafStream = null;
  1729.                return this.Err(2, true);
  1730.             }
  1731.          }
  1732.  
  1733.          return this.Err(0, true);
  1734.       }
  1735.    }
  1736.  
  1737.    public Rexx charout(Rexx var1) {
  1738.       Object var2 = null;
  1739.       Object var3 = null;
  1740.       if (var1 == null) {
  1741.          return this.Err(0, true);
  1742.       } else if (this.rafStream == null) {
  1743.          try {
  1744.             this.dosConsoleOut.writeBytes(var1.toString());
  1745.             this.dosConsoleOut.flush();
  1746.             return this.Err(0, true);
  1747.          } catch (IOException var5) {
  1748.             return this.Err(7, true);
  1749.          }
  1750.       } else if (this.rafStream == null) {
  1751.          return this.Err(-1, true);
  1752.       } else if (this.lWriteCurs == -1L) {
  1753.          return this.Err(7, true);
  1754.       } else {
  1755.          if (var1 == null) {
  1756.             var1 = new Rexx("");
  1757.          }
  1758.  
  1759.          if (this.lReadCurs != -1L) {
  1760.             Rexx var8 = this.synch(false);
  1761.             if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1762.                return var8;
  1763.             }
  1764.          }
  1765.  
  1766.          String var7 = var1.toString();
  1767.  
  1768.          try {
  1769.             this.rafStream.writeBytes(var7);
  1770.             if (this.bRWCurs) {
  1771.                this.lWriteCurs += (long)var7.length();
  1772.             } else if (this.lWriteCurs == -2L) {
  1773.                this.lReadCurs += (long)var7.length();
  1774.             } else {
  1775.                this.lWriteCurs += (long)var7.length();
  1776.             }
  1777.  
  1778.             this.bLastWasRead = false;
  1779.          } catch (IOException var6) {
  1780.             try {
  1781.                this.rafStream.close();
  1782.                this.rafStream = null;
  1783.                return this.Err(2, true);
  1784.             } catch (IOException var4) {
  1785.                this.rafStream = null;
  1786.                return this.Err(2, true);
  1787.             }
  1788.          }
  1789.  
  1790.          return this.Err(0, true);
  1791.       }
  1792.    }
  1793.  
  1794.    public Rexx charout(Rexx var1, Rexx var2) {
  1795.       Object var3 = null;
  1796.       Rexx var4 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1797.       return var4.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var4 : this.charout(var2);
  1798.    }
  1799.  
  1800.    public Rexx charout(Rexx var1, Rexx var2, long var3) {
  1801.       Object var5 = null;
  1802.       Rexx var6 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1803.       return var6.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var6 : this.charout(var2, var3);
  1804.    }
  1805.  
  1806.    public Rexx lineout(Rexx var1) {
  1807.       Object var2 = null;
  1808.       Object var3 = null;
  1809.       if (this.rafStream == null) {
  1810.          try {
  1811.             this.dosConsoleOut.writeBytes(var1.OpCc((RexxSet)null, this.rNLine).toString());
  1812.             this.dosConsoleOut.flush();
  1813.             return this.Err(0, true);
  1814.          } catch (IOException var5) {
  1815.             return this.Err(7, true);
  1816.          }
  1817.       } else if (this.lWriteCurs == -1L) {
  1818.          return this.Err(7, true);
  1819.       } else {
  1820.          if (var1 == null) {
  1821.             var1 = new Rexx("");
  1822.          }
  1823.  
  1824.          if (this.lReadCurs != -1L) {
  1825.             Rexx var8 = this.synch(false);
  1826.             if (var8.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1827.                return var8;
  1828.             }
  1829.          }
  1830.  
  1831.          String var7 = var1.OpCc((RexxSet)null, this.rNLine).toString();
  1832.  
  1833.          try {
  1834.             this.rafStream.writeBytes(var7);
  1835.             if (this.bRWCurs) {
  1836.                this.lWriteCurs += (long)var7.length();
  1837.             } else if (this.lWriteCurs == -2L) {
  1838.                this.lReadCurs += (long)var7.length();
  1839.             } else {
  1840.                this.lWriteCurs += (long)var7.length();
  1841.             }
  1842.  
  1843.             this.bLastWasRead = false;
  1844.          } catch (IOException var6) {
  1845.             try {
  1846.                this.rafStream.close();
  1847.                this.rafStream = null;
  1848.                return this.Err(2, true);
  1849.             } catch (IOException var4) {
  1850.                this.rafStream = null;
  1851.                return this.Err(2, true);
  1852.             }
  1853.          }
  1854.  
  1855.          return this.Err(0, true);
  1856.       }
  1857.    }
  1858.  
  1859.    public Rexx lineout(Rexx var1, long var2) {
  1860.       Object var4 = null;
  1861.       Object var5 = null;
  1862.       if (this.rafStream == null) {
  1863.          return this.Err(-1, true);
  1864.       } else if (this.lWriteCurs == -1L) {
  1865.          return this.Err(7, true);
  1866.       } else if (var2 < 0L) {
  1867.          return this.Err(1, true);
  1868.       } else {
  1869.          if (var1 == null) {
  1870.             var1 = new Rexx("");
  1871.          }
  1872.  
  1873.          var1 = var1.OpCc((RexxSet)null, this.rNLine);
  1874.          if (this.lReadCurs != -1L) {
  1875.             Rexx var10 = this.synch(false);
  1876.             if (var10.OpNotEq((RexxSet)null, new Rexx(this.rReady))) {
  1877.                return var10;
  1878.             }
  1879.          }
  1880.  
  1881.          String var9 = var1.toString();
  1882.          if (var2 != 0L) {
  1883.             Rexx var11;
  1884.             if (this.bRWCurs) {
  1885.                var11 = this.stream(new Rexx(this.rCommand), new Rexx(this.rWSeekAt + String.valueOf(var2)));
  1886.                if (var11.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1887.                   return var11;
  1888.                }
  1889.             } else {
  1890.                var11 = this.stream(new Rexx(this.rCommand), new Rexx(this.rSeekAt + String.valueOf(var2)));
  1891.             }
  1892.  
  1893.             if (var11.datatype(new Rexx(this.rNumeric)).OpNotEq((RexxSet)null, $$36)) {
  1894.                return var11;
  1895.             }
  1896.          }
  1897.  
  1898.          try {
  1899.             this.rafStream.writeBytes(var9);
  1900.             if (this.bRWCurs) {
  1901.                this.lWriteCurs += (long)var9.length();
  1902.             } else if (this.lWriteCurs == -2L) {
  1903.                this.lReadCurs += (long)var9.length();
  1904.             } else {
  1905.                this.lWriteCurs += (long)var9.length();
  1906.             }
  1907.  
  1908.             this.bLastWasRead = false;
  1909.          } catch (IOException var7) {
  1910.             try {
  1911.                this.rafStream.close();
  1912.                this.rafStream = null;
  1913.                return this.Err(2, true);
  1914.             } catch (IOException var6) {
  1915.                this.rafStream = null;
  1916.                return this.Err(2, true);
  1917.             }
  1918.          }
  1919.  
  1920.          return this.Err(0, true);
  1921.       }
  1922.    }
  1923.  
  1924.    public Rexx lineout(Rexx var1, Rexx var2, long var3) {
  1925.       Object var5 = null;
  1926.       Rexx var6 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1927.       return var6.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var6 : this.lineout(var2, var3);
  1928.    }
  1929.  
  1930.    public Rexx lineout(Rexx var1, Rexx var2) {
  1931.       Object var3 = null;
  1932.       Rexx var4 = this.stream(var1, new Rexx(this.rCommand), new Rexx(this.rOpen));
  1933.       return var4.OpNotEq((RexxSet)null, new Rexx(this.rReady)) ? var4 : this.lineout(var2);
  1934.    }
  1935. }
  1936.