Ruby Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Ruby
Examples

Quick Start
Ruby Unicode
Ruby Byte Array
Ruby Certs
Ruby Email
Ruby Encryption
Ruby FTP
HTML-to-XML
Ruby HTTP
Ruby IMAP
Ruby MHT
Ruby MIME
Ruby S/MIME
Ruby Signatures
Ruby RSA
Ruby Socket
Ruby Spider
Ruby Tar
Ruby Upload
Ruby XML
Ruby XMP
Ruby Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
DH Key Exchange
DSA

Unreleased...
LZW
Bz2
Icon

 

 

 

 

 

 

 

appendInt, appendShort, appendStr

Append 4-byte integer, 2-byte short integer, and string to CkByteData.

Download Chilkat Ruby Library

require 'chilkat'

data = Chilkat::CkByteData.new()

littleEndian = true

#  Append 4-byte signed integer in little-endian byte-order
#  ( 1193046 decimal = 0x123456 hex )
data.appendInt(1193046,littleEndian)

#  Append 2-byte signed integer in little-endian byte-order
#  ( 4660 decimal = 0x1234 hex )
data.appendShort(4660,littleEndian)

#  Append an ANSI string:
data.appendStr("ABCD")

#  Examine the bytes as a hex encoded string:
print data.getEncoded("hex") + "\n";
 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.