/[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.7 by mkoch, Wed Feb 11 19:05:14 2004 UTC revision 1.8 by mkoch, Fri Jul 16 08:42:53 2004 UTC
# Line 46  import gnu.classpath.Configuration; Line 46  import gnu.classpath.Configuration;
46   */   */
47  public final class ByteOrder  public final class ByteOrder
48  {  {
49    public static final ByteOrder BIG_ENDIAN     = new ByteOrder();    public static final ByteOrder BIG_ENDIAN = new ByteOrder();
50    public static final ByteOrder LITTLE_ENDIAN  = new ByteOrder();    public static final ByteOrder LITTLE_ENDIAN  = new ByteOrder();
51    
   static  
   {  
     // load the shared library needed for native methods.  
     if (Configuration.INIT_LOAD_LIBRARY)  
       {  
         System.loadLibrary ("javanio");  
       }  
   }  
     
52    /**    /**
53     * Returns the native byte order of the platform currently running.     * Returns the native byte order of the platform currently running.
54     */     */
55    public static ByteOrder nativeOrder ()    public static ByteOrder nativeOrder()
56    {    {
57      return (System.getProperty ("gnu.cpu.endian").equals("big")      return (System.getProperty ("gnu.cpu.endian").equals("big")
58              ? BIG_ENDIAN : LITTLE_ENDIAN);              ? BIG_ENDIAN : LITTLE_ENDIAN);
# Line 76  public final class ByteOrder Line 67  public final class ByteOrder
67    }    }
68    
69    // This class can only be instantiated here.    // This class can only be instantiated here.
70    private ByteOrder ()    private ByteOrder()
71    {    {
72    }    }
73  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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