/[classpath]/classpath/java/nio/ByteOrder.java
ViewVC logotype

Diff of /classpath/java/nio/ByteOrder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mark, Tue Apr 30 21:37:26 2002 UTC revision 1.3 by tromey, Sat Jul 27 01:14:02 2002 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38  package java.nio;  package java.nio;
39    
40    
41  public class ByteOrder  public final class ByteOrder
42  {  {
43      final static ByteOrder BIG_ENDIAN     = new ByteOrder();    static final ByteOrder BIG_ENDIAN     = new ByteOrder();
44      final static ByteOrder LITTLE_ENDIAN  = new ByteOrder();    static final ByteOrder LITTLE_ENDIAN  = new ByteOrder();
45    
46      static ByteOrder nativeOrder()    public static ByteOrder nativeOrder()
47      {    {
48          return BIG_ENDIAN;      return BIG_ENDIAN;
49      }    }
50    
51      public String toString()    public String toString()
52      {    {
53          if (this == BIG_ENDIAN)      return this == BIG_ENDIAN ? "BIG_ENDIAN" : "LITTLE_ENDIAN";
54              {    }
55                  return "big endian";  
56              }    // This class can only be instantiated here.
57          else    private ByteOrder ()
58              {    {
59                  return "little endian";    }
             }  
     }  
   
60  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26