UninterpretedBytes.st
changeset 3209 eff7ad7f0825
parent 3207 a6e3c98e2a8e
child 3212 b8cc18f8691b
equal deleted inserted replaced
3208:2d71538b9fd5 3209:eff7ad7f0825
    53     [author:]
    53     [author:]
    54         Claus Gittinger
    54         Claus Gittinger
    55 "
    55 "
    56 ! !
    56 ! !
    57 
    57 
       
    58 !UninterpretedBytes class methodsFor:'binary storage'!
       
    59 
       
    60 binaryDefinitionFrom:stream manager:manager
       
    61     "get a ByteArray from the binary stream.
       
    62      ByteArrays are stored as 4-byte size, followed by the bytes.
       
    63      This is only invoked for long bytearrays. 
       
    64      Short ones are stored with 1byte length."
       
    65 
       
    66     self subclassResponsibility
       
    67 ! !
       
    68 
    58 !UninterpretedBytes class methodsFor:'queries'!
    69 !UninterpretedBytes class methodsFor:'queries'!
    59 
    70 
    60 isBigEndian
    71 isBigEndian
    61     "return true, if words/shorts store the most-significant
    72     "return true, if words/shorts store the most-significant
    62      byte first (MSB), false if least-sign.-first (LSB). 
    73      byte first (MSB), false if least-sign.-first (LSB). 
    76     u.u_l = 0x87654321;
    87     u.u_l = 0x87654321;
    77     if (u.u_c[0] == 0x21) RETURN (false);
    88     if (u.u_c[0] == 0x21) RETURN (false);
    78     RETURN (true);
    89     RETURN (true);
    79 %}
    90 %}
    80     "UninterpretedBytes isBigEndian"
    91     "UninterpretedBytes isBigEndian"
    81 ! !
    92 !
    82 
       
    83 !UninterpretedBytes class methodsFor:'binary storage'!
       
    84 
       
    85 binaryDefinitionFrom:stream manager:manager
       
    86     "get a ByteArray from the binary stream.
       
    87      ByteArrays are stored as 4-byte size, followed by the bytes.
       
    88      This is only invoked for long bytearrays. 
       
    89      Short ones are stored with 1byte length."
       
    90 
       
    91     self subclassResponsibility
       
    92 ! !
       
    93 
       
    94 !UninterpretedBytes class methodsFor:'queries'!
       
    95 
    93 
    96 isBuiltInClass
    94 isBuiltInClass
    97     "return true if this class is known by the run-time-system.
    95     "return true if this class is known by the run-time-system.
    98      Here, true is returned, since ByteStore is the superclass of
    96      Here, true is returned, since ByteStore is the superclass of
    99      some builtIn classes (ByteArray & ExternalBytes)"
    97      some builtIn classes (ByteArray & ExternalBytes)"
   747     ^ bytes asString
   745     ^ bytes asString
   748 
   746 
   749     "Created: 9.9.1996 / 15:28:34 / cg"
   747     "Created: 9.9.1996 / 15:28:34 / cg"
   750 ! !
   748 ! !
   751 
   749 
   752 !UninterpretedBytes methodsFor:'converting'!
   750 !UninterpretedBytes class methodsFor:'documentation'!
   753 
   751 
   754 asByteArray
   752 version
   755     "return the receiver as a byteArray"
   753     ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.18 1998-01-21 16:38:18 cg Exp $'
   756 
       
   757     self subclassResponsibility
       
   758 ! !
   754 ! !
   759 
       
   760 !UninterpretedBytes class methodsFor:'documentation'!
       
   761 
       
   762 version
       
   763     ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.17 1998-01-21 16:08:21 cg Exp $'
       
   764 ! !