29:
30: for i in 1..chunkcount loop
31: dbms_lob.read(pIDoc, chunksize, position, rawData);
32: base64raw := utl_encode.base64_encode(rawData);
33: cBuffer := utl_raw.cast_to_varchar2(base64Raw);
34: dbms_lob.writeAppend(pODoc, length(cBuffer), cBuffer);
35: position := position + chunksize;
36: end loop;
37: dbms_lob.WriteAppend(pODoc, 1, wf_core.newline);
70:
71: dbms_lob.trim(pODoc, 0);
72: for i in 1..chunkcount loop
73: dbms_lob.read(pIDoc, chunksize, position, cBuffer);
74: base64raw := utl_raw.cast_to_raw(cBuffer);
75: rawData := utl_encode.base64_decode(base64Raw);
76: bufsize := utl_raw.length(rawData);
77: dbms_lob.writeAppend(pODoc, bufsize, rawData);
78: position := position + chunksize;
72: for i in 1..chunkcount loop
73: dbms_lob.read(pIDoc, chunksize, position, cBuffer);
74: base64raw := utl_raw.cast_to_raw(cBuffer);
75: rawData := utl_encode.base64_decode(base64Raw);
76: bufsize := utl_raw.length(rawData);
77: dbms_lob.writeAppend(pODoc, bufsize, rawData);
78: position := position + chunksize;
79: end loop;
80: