Format B new Buffer string unicode bigEndian Format B creates a new buffer

Format b new buffer string unicode bigendian format b

This preview shows page 112 - 114 out of 334 pages.

Format B new Buffer( string [, unicode ] [, bigEndian ] ); Format B creates a new buffer object from a string that you provide. A line of code that uses format B creates a new buffer object from the buffer provided. Siebel CRM copies the contents of the buffer into the new buffer object. The unicode argument and the bigEndian argument do not affect this conversion, although they do set the relevant flags for future use. Table 50 describes the buffer constructor arguments that are specific to format B. Format C new Buffer( buffer [, unicode ] [, bigEndian ]); Table 49. Arguments for the Buffer Constructor for Format A Argument Description size The size of the new buffer that Siebel eScript creates. You can do one of the following: Specify the size argument. Siebel eScript creates the new buffer with the size you specify and fills it with null bytes. Do not specify the size argument. Siebel eScript creates the new buffer with a size of 0. You can configure it to dynamically extend the new buffer later. Table 50. Arguments for the Buffer Constructor for Format B Argument Description string The string that Siebel eScript uses as input to create the buffer. If the string argument contains a Unicode string, then Siebel eScript creates the buffer as a Unicode string. To use a Unicode string, you must enable Unicode in the Siebel application. To override this behavior, you can specify false in the optional unicode argument. The size of the buffer depends on if the string is a Unicode string: The string is a Unicode string. The size of the buffer is twice the length of the input string. The string is not a Unicode string. The size of the buffer is the length of the input string. A buffer constructor does not add a terminating null byte at the end of the string.
Image of page 112
Methods Reference Buffer Methods Siebel eScript Language Reference Version 8.1, Rev. A 113 Table 51 describes the buffer constructor arguments that are specific to format C. Format D new Buffer( bufferobject ); A line of code that uses format D creates a new buffer object from another buffer object. Siebel CRM copies the contents of the buffer object to the new buffer verbatim, including the cursor position, size, and data. Table 52 describes the buffer constructor arguments that are specific to format D. Example The following example creates new buffer objects: function BufferConstruct() { TheApplication().TraceOn("c:\\temp\\BufferTrace.doc","Allocation","All"); // Create empty buffer with size 100 var buff1 = new Buffer(100 , true , true); // Create a buffer from string var buff2 = new Buffer("This is a buffer String constructor example", true); // Create buffer from buffer var buff3 = new Buffer(buff2,false); try { with(buff1) { // Add values from 0-99 to the buffer for(var i=0;i<size;i++) { putValue(i); } var val = ""; cursor=0; // Read the buffer values into variable for(var i=0;i<size;i++) { val += getValue(1)+" "; } Table 51. Arguments for the Buffer Constructor for Format C Argument Description buffer The buffer that Siebel eScript uses as input to create the new buffer.
Image of page 113
Image of page 114

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes