Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: ClassLib/Common/java/io/ObjectOutputStream.java


1   // ObjectOutputStream.java, created Mon Jul  8  0:41:49 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package ClassLib.Common.java.io;
5   
6   import Run_Time.Unsafe;
7   import Util.Assert;
8   import Util.Convert;
9   
10  /**
11   * ObjectOutputStream
12   *
13   * @author  John Whaley <jwhaley@alum.mit.edu>
14   * @version $Id: ObjectOutputStream.java,v 1.6 2003/05/12 10:04:53 joewhaley Exp $
15   */
16  public abstract class ObjectOutputStream {
17  
18      private static void floatsToBytes(float[] src, int srcpos, byte[] dst, int dstpos, int nfloats) {
19          --srcpos;
20          while (--nfloats >= 0) {
21              Convert.intToFourBytes(Unsafe.floatToIntBits(src[++srcpos]), dst, dstpos);
22              dstpos += 4;
23          }
24      }
25      private static void doublesToBytes(double[] src, int srcpos, byte[] dst, int dstpos, int ndoubles) {
26          --srcpos;
27          while (--ndoubles >= 0) {
28              Convert.longToEightBytes(Unsafe.doubleToLongBits(src[++srcpos]), dst, dstpos);
29              dstpos += 8;
30          }
31      }
32      private static void getPrimitiveFieldValues(java.lang.Object obj, long[] fieldIDs, char[] typecodes, byte[] data) {
33          Assert.TODO();
34      }
35      private static java.lang.Object getObjectFieldValue(java.lang.Object obj, long fieldID) {
36          Assert.TODO();
37          return null;
38      }
39      
40  }