home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / APCHSSL2.ZIP / OS2HTTPD / jserv / com / netscape / javascript / Source.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  1.1 KB  |  41 lines

  1. package com.netscape.javascript;
  2.  
  3. final class Source {
  4.    char functionNumber;
  5.    StringBuffer buf = new StringBuffer(64);
  6.  
  7.    void addNumber(Number var1) {
  8.       this.buf.append('-');
  9.       if (!(var1 instanceof Double) && !(var1 instanceof Float)) {
  10.          long var4 = var1.longValue();
  11.          if (var4 <= 65535L) {
  12.             this.buf.append('S');
  13.             this.buf.append((char)((int)var4));
  14.          } else {
  15.             this.buf.append('J');
  16.             this.buf.append((char)((int)(var4 >> 48 & 65535L)));
  17.             this.buf.append((char)((int)(var4 >> 32 & 65535L)));
  18.             this.buf.append((char)((int)(var4 >> 16 & 65535L)));
  19.             this.buf.append((char)((int)(var4 & 65535L)));
  20.          }
  21.       } else {
  22.          this.buf.append('D');
  23.          long var2 = Double.doubleToLongBits(var1.doubleValue());
  24.          this.buf.append((char)((int)(var2 >> 48 & 65535L)));
  25.          this.buf.append((char)((int)(var2 >> 32 & 65535L)));
  26.          this.buf.append((char)((int)(var2 >> 16 & 65535L)));
  27.          this.buf.append((char)((int)(var2 & 65535L)));
  28.       }
  29.    }
  30.  
  31.    void append(char var1) {
  32.       this.buf.append(var1);
  33.    }
  34.  
  35.    void addString(int var1, String var2) {
  36.       this.buf.append((char)var1);
  37.       this.buf.append((char)var2.length());
  38.       this.buf.append(var2);
  39.    }
  40. }
  41.