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

How To: Remove all rows from view object (VO) in OAF & ADF

This is the basic requirement when we are working with oracle OAF. In which we need to removed the all rows from the table. The best use ca...