zoukankan      html  css  js  c++  java
  • Director11.5显示中文,ByteArray

      _data = p_sprite.getdata()
      put "...data:" && _data && RETURN
      ba = new(#byteArray)
      ba =  byteArray( "0000" & _data)  --padding 4 bytes..
      put "...bytearray:" && ba  && RETURN  
      --readstring,the first 4 bytes store the length of..  
      chs = ba.ReadString(getSystemCharset())  
      put "...readstring:" && chs && RETURN

    -------------------------------------------------------------------------------- 
    ByteArray

    是内置媒体类型。该类型memberref只有一个属性即.byteArray。

    操作符:

    1.可使用下标访问

    2.可直接转换string(ba)

    属性

    BytesRemaining --(RO)
    endian
    length (byte array) --(RO)

    position (byte array)  

    方法

    ByteArray
    ByteArray(str)
    readBoolean
    writeBoolean
    readInt8
    readInt16
    readInt32
    writeInt8
    writeInt16
    writeInt32
    readFloat32
    readFloat64
    writeFloat32
    writeFloat64
    readByteArray
    writeByteArray
    readString
    writeString (byte array)
    readRawString
    writeRawString
    compress()
    uncompress()

    toHexString 

     -------------------------------------------------------------------------------- 

    _system. *

    getInstalledCharsets()

    getSystemCharset() 

    isCharSetInstalled() 

  • 相关阅读:
    php+apache+mysql环境搭建
    怎么理解依赖注入
    maven修改远程和本地仓库地址
    idea创建的java web项目打包发布到tomcat
    MYSQL 导入导出数据库文件
    MySQL约束
    mysql字符集校对
    prime
    POJ-2564 01背包问题
    POJ-1564 dfs
  • 原文地址:https://www.cnblogs.com/mumuliang/p/2503529.html
Copyright © 2011-2022 走看看