Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

UTL_RAW , 13 of 22


OVERLAY Function

This function overlays the specified portion of target RAW with overlay RAW, starting from byte position pos of target and proceeding for len bytes.

If overlay has less than len bytes, then it is extended to len bytes using the pad byte. If overlay exceeds len bytes, then the extra bytes in overlay are ignored. If len bytes beginning at position pos of target exceeds the length of target, then target is extended to contain the entire length of overlay.

len, if specified, must be greater than, or equal to, 0. pos, if specified, must be greater than, or equal to, 1. If pos exceeds the length of target, then target is padded with pad bytes to position pos, and target is further extended with overlay bytes.

Syntax

UTL_RAW.OVERLAY (
   overlay_str IN RAW,
   target      IN RAW,
   pos         IN BINARY_INTEGER DEFAULT 1,
   len         IN BINARY_INTEGER DEFAULT NULL,
   pad         IN RAW            DEFAULT NULL) 
  RETURN RAW;

Pragmas

pragma restrict_references(overlay, WNDS, RNDS, WNPS, RNPS); 

Parameters

Table 80-20 OVERLAY Function Parameters
Parameters  Description 
overlay_str
 

Byte-string used to overlay target. 

target
 

Byte-string which is to be overlayed. 

pos
 

Position in target (numbered from 1) to start overlay. 

len
 

The number of target bytes to overlay. 

pad
 

Pad byte used when overlay len exceeds overlay length or pos exceeds target length. 

Defaults and Optional Parameters

Table 80-21 OVERLAY Function Optional Parameters
Optional Parameter  Description 
pos
 

len
 

To the length of overlay 

pad
 

x'00' 

Returns

Table 80-22 OVERLAY Function Returns
Return  Description 
RAW
 

The target byte_string overlayed as specified. 

Errors

Table 80-23 OVERLAY Function Errors
Error  Description 
VALUE_ERROR
 

Either:

- Overlay is NULL and/or has 0 length

- Target is missing or undefined

- Length of target exceeds maximum length of a RAW

- len < 0

- pos < 1 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback