Wednesday 18 March 2020

Update file to server OAF java

    public void uploadFileToServer(OAPageContext pageContext,String fileName,BlobDomain pBlobDomain)
    {
 
    try
    {
     File file = new File("/opt/apps/apps_st/comn/temp", fileName);
     FileOutputStream output =  new FileOutputStream(file);
    for (int bytes = 0; bytes < pBlobDomain.getLength(); bytes++)
    {
    output.write(pBlobDomain.getInputStream().read());
    }
    System.out.println(" file writing");
        output.close();
    }
    catch (Exception e)
    {
    e.printStackTrace();
    throw new OAException(e.getMessage(),OAException.ERROR);
    }
 
        throw new OAException(("file size:"+pBlobDomain.getLength()),OAException.ERROR);
    }

No comments:

Post a Comment

OADBTransactionImpl in Oracle Application Framework (OAF)

OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...