dict.setItem("Domain", domainArray);
COSArray rangeArray = new COSArray();
rangeArray.setFloatArray(range);
dict.setItem("Range", rangeArray);
COSStream functionStream = new COSStream(dict, new RandomAccessBuffer());
OutputStream out = functionStream.createUnfilteredStream();
byte[] data = function.getBytes("US-ASCII");
out.write(data, 0, data.length);
out.flush();