Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: Java | Size: 4.48 KB | Hits: 50 | Expires: Never
Copy text to clipboard
  1. import java.io.*;
  2. import rs.Class46;
  3.  
  4. public class Object {
  5.  
  6.         public Object() throws IOException {
  7.                 DataOutputStream dat = new DataOutputStream(new FileOutputStream("loc.dat"));
  8.                 DataOutputStream idx = new DataOutputStream(new FileOutputStream("loc.idx"));
  9.                 idx.writeShort(Class46.anInt756);
  10.                 dat.writeShort(Class46.anInt756);
  11.                 for (int i = 0; i < Class46.anInt756; i++) {
  12.                         Class46 obj = Class46.method572(i);
  13.                         int offset1 = dat.size();
  14.  
  15.                         if(obj.anIntArray773 != null) {
  16.                                 if(obj.anIntArray776 != null) {
  17.                                         dat.writeByte(1);
  18.                                         dat.writeByte(obj.anIntArray773.length);
  19.                                         for(int ii = 0; ii < obj.anIntArray773.length; ii++) {
  20.                                                 dat.writeShort(obj.anIntArray773[ii]);
  21.                                                 dat.writeByte(obj.anIntArray776[ii]);
  22.                                         }
  23.                                 } else {
  24.                                         dat.writeByte(5);
  25.                                         dat.writeByte(obj.anIntArray773.length);
  26.                                         for(int ii = 0; ii < obj.anIntArray773.length; ii++) {
  27.                                                 dat.writeShort(obj.anIntArray773[ii]);
  28.                                         }
  29.                                 }
  30.                         }
  31.                         if(obj.aString739 != null) {
  32.                                 dat.writeByte(2);
  33.                                 writeString(dat, obj.aString739);
  34.                         }
  35.                         if(obj.description != null) {
  36.                                 dat.writeByte(3);
  37.                                 writeString(dat, obj.description.toString());
  38.                         }
  39.                         if(obj.anInt744 != 1) {
  40.                                 dat.writeByte(14);
  41.                                 dat.writeByte(obj.anInt744);
  42.                         }
  43.                         if(obj.anInt761 != 1) {
  44.                                 dat.writeByte(15);
  45.                                 dat.writeByte(obj.anInt761);
  46.                         }
  47.                         if(!obj.aBoolean767) {
  48.                                 dat.writeByte(17);
  49.                         }
  50.                         if(!obj.aBoolean757) {
  51.                                 dat.writeByte(18);
  52.                         }
  53.                         if(obj.aBoolean778) {
  54.                                 dat.writeByte(19);
  55.                                 dat.writeByte(1);
  56.                         }
  57.                         if(obj.aBoolean762) {
  58.                                 dat.writeByte(21);
  59.                         }
  60.                         if(obj.aBoolean769) {
  61.                                 dat.writeByte(22);
  62.                         }
  63.                         if(obj.aBoolean764) {
  64.                                 dat.writeByte(23);
  65.                         }
  66.                         dat.writeByte(24);
  67.                         dat.writeShort(obj.anInt781 == -1 ? 65535 : obj.anInt781);
  68.                         if(obj.anInt775 != 16) {
  69.                                 dat.writeByte(28);
  70.                                 dat.writeByte(obj.anInt775);
  71.                         }
  72.                         if(obj.aByte737 != 0) {
  73.                                 dat.writeByte(29);
  74.                                 dat.writeByte(obj.aByte737);
  75.                         }
  76.                         if(obj.aByte742 != 0) {
  77.                                 dat.writeByte(39);
  78.                                 dat.writeByte(obj.aByte742);
  79.                         }
  80.                         if(obj.aStringArray786 != null) {
  81.                                 for (int ii = 0; ii < 5; ii++) {
  82.                                         dat.writeByte(30 + ii);
  83.                                         if(obj.aStringArray786[ii] == null) {
  84.                                                 writeString(dat, "hidden");
  85.                                         } else {
  86.                                                 writeString(dat, obj.aStringArray786[ii]);
  87.                                         }
  88.                                 }
  89.                         }
  90.                         if(obj.anIntArray784 != null || obj.anIntArray747 != null) {
  91.                                 dat.writeByte(40);
  92.                                 dat.writeByte(obj.anIntArray784.length);
  93.                                 for (int ii = 0; ii < obj.anIntArray784.length; ii++) {
  94.                                         dat.writeShort(obj.anIntArray784[ii]);
  95.                                         dat.writeShort(obj.anIntArray747[ii]);
  96.                                 }
  97.                         }
  98.                         if(obj.anInt746 != -1) {
  99.                                 dat.writeByte(60);
  100.                                 dat.writeShort(obj.anInt746);
  101.                         }
  102.                         if(obj.aBoolean751) {
  103.                                 dat.writeByte(62);
  104.                         }
  105.                         if(!obj.aBoolean779) {
  106.                                 dat.writeByte(64);
  107.                         }
  108.                         if(obj.anInt748 != 128) {
  109.                                 dat.writeByte(65);
  110.                                 dat.writeShort(obj.anInt748);
  111.                         }
  112.                         if(obj.anInt772 != 128) {
  113.                                 dat.writeByte(66);
  114.                                 dat.writeShort(obj.anInt772);
  115.                         }
  116.                         if(obj.anInt740 != 128) {
  117.                                 dat.writeByte(67);
  118.                                 dat.writeShort(obj.anInt740);
  119.                         }
  120.                         if(obj.anInt758 != -1) {
  121.                                 dat.writeByte(68);
  122.                                 dat.writeShort(obj.anInt758);
  123.                         }
  124.                         if(obj.anInt768 != 0) {
  125.                                 dat.writeByte(69);
  126.                                 dat.writeByte(obj.anInt768);
  127.                         }
  128.                         if(obj.anInt738 != 0) {
  129.                                 dat.writeByte(70);
  130.                                 dat.writeShort(obj.anInt738);
  131.                         }
  132.                         if(obj.anInt745 != 0) {
  133.                                 dat.writeByte(71);
  134.                                 dat.writeShort(obj.anInt745);
  135.                         }
  136.                         if(obj.anInt783 != 0) {
  137.                                 dat.writeByte(72);
  138.                                 dat.writeShort(obj.anInt783);
  139.                         }
  140.                         if(obj.aBoolean736) {
  141.                                 dat.writeByte(73);
  142.                         }
  143.                         if(obj.aBoolean766) {
  144.                                 dat.writeByte(74);
  145.                         }
  146.                         if(obj.anInt760 != -1) {
  147.                                 dat.writeByte(75);
  148.                                 dat.writeByte(obj.anInt760);
  149.                         }
  150.                         if(obj.anInt774 != -1 || obj.anInt749 != -1 || obj.anIntArray759 != null) {
  151.                                 dat.writeByte(77);
  152.                                 dat.writeShort(obj.anInt774 == -1 ? 65535 : obj.anInt774);
  153.                                 dat.writeShort(obj.anInt749 == -1 ? 65535 : obj.anInt749);
  154.                                 dat.writeByte(obj.anIntArray759.length - 1);
  155.                                 for (int ii = 0; ii < obj.anIntArray759.length; ii++) {
  156.                                         dat.writeShort(obj.anIntArray759[ii] == -1 ? 65535 : obj.anIntArray759[ii]);
  157.                                 }
  158.                         }
  159.  
  160.                         dat.writeByte(0);
  161.                         int offset2 = dat.size();
  162.                         int writeOffset = offset2 - offset1;
  163.                         idx.writeShort(writeOffset);
  164.                 }
  165.                 dat.close();
  166.                 idx.close();
  167.         }
  168.        
  169.         private void writeString(DataOutputStream dos, String input) throws IOException {
  170.                 dos.write(input.getBytes());
  171.                 dos.writeByte(10);
  172.         }
  173.  
  174. }