How to file converted to the Blob? Help me

Hey guys...
How to convert blob inputStream?

Kit = new RTFEditorKit();
Doc document = kit.createDefaultDocument ();
InputStream is = getUploadedFile () .getInputStream ();


DCIteratorBinding iterTemplate = ADFUtils.findIterator ("TemplateVOIterator");
Line currentRow = iterTemplate.getCurrentRow ();
String templateId = currentRow.getAttribute("Id").toString ();

currentRow.setAttribute ("TemplateFile"?), Here Blob file...

"is' convert blob object?

What about Ninja

Published by: Ninja on July 21, 2011 19:04

Published by: Ninja on July 21, 2011 23:39

Well, it's all in the Frank sample made you:

//your code
{...
kit = new RTFEditorKit();
Document doc = kit.createDefaultDocument();
InputStream is = getUploadedFile().getInputStream();

DCIteratorBinding iterTemplate = ADFUtils.findIterator("TemplateVOIterator");
Row currentRow = iterTemplate.getCurrentRow();
String templateId = currentRow.getAttribute("Id").toString();

currentRow.setAttribute("TemplateFile", newBlobDomainForInputStream(is)); in here Blob file....
....
}

  private BlobDomain newBlobDomainForInputStream(InputStream in) throws SQLException, IOException {
    BlobDomain b = new BlobDomain();
    OutputStream out = b.getBinaryOutputStream();
    writeInputStreamToOutputStream(in,out);
    in.close();
    out.close();
    return b;
  }

  private static void writeInputStreamToOutputStream(InputStream in, OutputStream out) throws IOException {
    byte[] buffer = new byte[8192];
    int bytesRead = 0;
    while ((bytesRead = in.read(buffer, 0, 8192)) != -1) {
           out.write(buffer, 0, bytesRead);
    }
  }

Timo

Tags: Java

Similar Questions

  • Is there a file converter or the codec available to open/read files .vvf

    reading cctv .vvf file

    Is there a file converter or the codec available to open/read files .vvf

    Help, please

    thanx

    Nev

    Have you tried VLC Player?

    VLC Media Player - he can play almost all audio and video files:

    http://www.videolan.org/VLC

  • BlackBerry Smartphones how can I convert save the file into something readable!

    Using the Desktop Manager that I created a .ipd backup file.

    Now... How can I convert these data into something I can easily recognize?

    Oops - I forgot that the app... JSanders thanks!

  • I don't want to save the file converted to the cloud. I WANT it on my PC.

    I don't want to save the file converted to cloud ther. I WANT it on my PC. I think that there is something wrong with my subscription. I paid fees six months from a year ago.

    Hi urs.boeschenstein,

    Files are automatically saved in your online account when you use Acrobat.com online services. However, you can probably download the files on your computer, by selecting to https://cloud.acrobat.com/filesand then by clicking on the download icon.

    Additional problems with your subscription?

    Best,

    Sara

  • How to insert data into the BLOB column

    Hi all

    Can someone help me to insert data in the BLOB data type column?

    The structure of the table is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    (
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER (15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER (15),
    DATE OF LAST_UPDATE_DATE,
    LAST_UPDATE_LOGIN NUMBER (15),
    RECORD_STATUS VARCHAR2 (1 BYTE),
    ERROR_MESSAGE VARCHAR2 (4000 BYTE),
    DATA_FILE BLOB
    )

    I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.

    Please help me as soon as possible because it is very urgent for me

    Thank you and best regards,
    Charrier

    Charrier,

    If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.

    http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086

    sql> create table t(
      2    id number,
      3    l_blob blob
      4  );
    
    sql> insert into t values(1, utl_raw.cast_to_raw('SampleString'));
    
    1 row created.
    
    sql> commit;
    
    Commit complete.
    
  • Premiere Pro CS6 generates the HUGE file - settings of the encoder help please

    Use PPCS6 to create a 6-minute AVI file. The video source is a screenshot of Camtasia AVI for an application that runs on 3 monitors, making the screen/video resolution 5760 x 1200 with a rate of 30. I need the same resolution/output format (Camtasia won't do that, where my first use).

    The original screenshot is slightly less than 2 GB.

    The output of AVI since Media encode is 45 GB that is simply too big to use.

    Is there some settings I can use which will create a file of about the same size (less than 3 GB), and always look as sharp as the initial capture?

    My current encoder settings are:

    Codec: Microsoft video 1

    Quality: 90

    Width: 5760

    Height: 1200

    Frame rate: 30

    Field order: lower first

    Appearance: Square Pixels (1.0)

    Depth: 8 bit

    Key frame interval: 8

    Optimize images checked.

    Use of Camtasia files their own codec TechSmith (TSCC) that is highly optimized for Screen Capture where virtually nothing changes from one image to the image, and realistic you can beat it with any one of the default codecs, which are designed for full-motion video. With MV1 file size is what I would expect from such a massive resolution. Also, do you really need 30 images per second? Most of the screencaps OK look at 12 15 or even at a push.

    You should be able to encode to AVI/TSCC, if you have Camtasia on the same machine as Prem, otherwise you can download the pack codec for free from the Web of Techsmith site.

  • Cannot change attributes read-only files, by updating the drivers help Driver Whiz from HP.

    Original title: change file attributes

    I'm updating some drivers help Driver Whiz from HP.  The new drivers download but will not be installed.  Apparently, I need to remove the read-only file attributes, but no matter what I do it continues to change the next time I have access to the file to read-only.  Any ideas?

    Hi keuller,

    You can read the following article and check if it helps:

    You cannot view or change the read-only or the attributes of system files in Windows Server 2003, Windows XP, Windows Vista or Windows 7

    http://support.Microsoft.com/kb/326549

    Hope this information is useful.

  • How read file HDA with the methods of the Complutense University of MADRID.

    I'm reading file HDA to standard java AAU code and I find the code on a forum below.

    But my problem is that when I pass the value to read his statements "NULL" every time. any one can help me.

    Public Shared Sub main (String [] args) {}

    DataBinder dataBinder = null;

    String dir = System.getenv ("HDAFILE");

    String file = "20130729_132245_931.hda";

    DataSerializeUtils.setDataSerialize (new DataBinderSerializer());

    intradoc.resource.ResourceUtils.serializeDataBinder

    try {}

    DataBinder dataBinder = ResourceUtils.readDataBinder (dir, file);

    Dim str As String = dataBinder.getLocal ("loadOrder");

    System.out.println ("loadOrder:" + str + dir);

    } catch (Exception e) {}

    System.out.println (e);

    return;

    }

    }

    Kind regards

    Deepak Petitjean

    Use the method get ("String") instead of getLocal("String");

    as,

    Dim str As String = dataBinder.get ("loadOrder");

    thnks

  • How can I convert in the NTSC color space?

    I'm at the graphic point to a Roku application that requires that colors spreads without danger in the SDTV NTSC color space. For example, I can't have true colours black white or real. They are not allowed.

    There is a space of RGB colors. When I create a new document in CS6, I choose this profile as the color space. However, I am still able to stick in the images that have a pure white in them. When I save the document for the web and devices, he always saves with pure white.

    I am sure I did this conversion in the past before, but I can't make it work in CS6. I tried going in Edition-> assign profile and Edit-> convert colors in profile, but in both cases, I'm still up to the end pure white.

    How is that possible?

    Hello

    See if filter > video > NTSC colors makes a difference.

  • How to convert only the first false true after a series of real values

    Hello

    I would like to know how I can convert only the first value false true after a series of true values. For example, I want to make the TTTFFF to TTTTFF.


  • Download the Blob file

    I use ADF BC, Jdeveloper11g 1.1.1.4

    in my application, I need the list down all the files stored in the Blob from a database table field in the af: table, if the user clicks on the name of the file that is linked to af:link, then the file will be opened to show the user the contents of the file.

    There is a sample built in 10g of http://technology.amis.nl/blog/category/oracle/adf-jheadstart, but only limited to types of files as 'doc', 'pdf', 'excel '.

    I think there is a solution put forward 11 g and also not be limited only these three types of file upload & dwonload to & database right of files?

    Could you expert give me only a sample built in 11g to let me study, thank you very much!

    http://KR.forums.Oracle.com/forums/thread.jspa?threadID=1982213 - looks like, you may need to change the contentType depending on the use case

  • APEX - opening World document (and other files) stored in a blob column?

    Hello

    I have an application developed in Oracle Apex 3.2.1 and RDBMS Oracle 9.2.0.8 (SUN SOLARIS SPARC 64-BIT).

    I have a table called BAC_ARQUIVO, with the following structure:

    CREATE TABLE BAC_ARQUIVO
    (NAME VARCHAR2 (4000), / * name of the file stored in a BLOB column * /)
    TOPIC VARCHAR2 (4000), / * a brief presentation of this file stored * /.
    Identification NUMBER, / * an identification of this file - it s a PK of this table column * /.
    BLOB BLOB_CONTENT, / * Blob field to store different types of files - XLS, DOC, PPT, PDF, EXE, ZIP, etc.) ;
    Mime_type VARCHAR2 (4000) / * Identification whose file type is stored in BLOB field * /.
    )


    The field BLOB_CONTENT in this table can store:

    -Executable files;
    -MS-world Documents (DOC);
    -Zip Files (ZIP).
    -Ms-Excel (XLS) files;
    -Ms-Powerpoint files (PPT);
    -Adobe (PDF) documents.

    In fact, in this application, APEX, I developed an interactive report in which the user can download these files to the desktop without problem.

    But now, my user I would like to know if it s possible ask APEX can OPEN some of these files stored on this download of WITHOUT BLOB column.

    My user would like to see a hiperlink (or button) that, if you press on/accessed, can open a new page (or page within the application) with the document. Doesn´t need to edit this file oppened. He wants only to see.

    For example, if the file stored in the blob column is type ms word, so the application opens an MS-WINDOWS application with these files.

    Is this possible?

    In this forum, I saw this it possible s to open a file stored on the directory "/ i /", but I need to open the file stored in the BLOB column. I Don t want to store the file in the operating system of the server.

    Could someone show me how it could be done?

    Best regards

    Sergio Coutinho

    Hi Sergio,

    You might find this link useful:

    http://www.Oracle.com/WebFolder/technetwork/tutorials/OBE/DB/Apex/R31/apex31nf/apex31blob.htm

    See also the Mask of Format download BLOB :

    {message: id = 9716335}

    Here I gave the format mask for APEX 4.0, which will be slightly different for 3.2.1 and proposed changes
    in the format of mask are:
    (1) mask format: DOWNLOAD
    (2) content-disposition: Inline

    This will be achieved with her:
    >
    But now, my user I would like to know if it s possible ask APEX can OPEN some of these files stored on this download of WITHOUT BLOB column.

    My user would like to see a hiperlink (or button) that, if you press on/accessed, can open a new page (or page within the application) with the document. Doesn´t need to edit this file oppened. He wants only to see.
    >

    I hope that helps!
    Kind regards
    Kiran

  • How to insert data into a BLOB column using sql

    Hi all

    How to insert data into the BLOB column directly using sql.
    create  table temp
    (
      a blob,
      b clob);
    
    SQL> /
    Insert into temp  values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
                                      *
    ERROR at line 1:
    ORA-01465: invalid hex number
    
    Please help in this.
    Thank you
    Prakash P

    Insert into temporary values (UTL_RAW. CAST_TO_RAW ('32aasdasdsdasdasd4e32'), 'adsfbsdkjf');

  • I really need someone to help me. I tried to figure out how to select a PDF to convert a Word doc. When I go to select a PDF file, all that comes is the WORD documents. doesn't show ANY of my PDF files... Please help me understand wh

    I really need someone to help me. I tried to figure out how to select a PDF to convert a Word doc. When I go to select a PDF file, all that comes is the WORD documents. doesn't show ANY of my PDF files... Please help me understand what is happening? We put it on automatic renewal so I know it's not that we have not renewed this subscription, because we pay automatically.

    Hi olivias,.

    Looks like there may be some confusion on your system which application should be associated with PDF files. You can reset the file name associations by following the steps described in these articles (depending on your operating system):

    How to change the default application for a file type. Macworld

    http://Windows.Microsoft.com/en-us/Windows/change-default-programs#1TC=Windows-7

    Please let us know if you have any additional questions.

    Best,

    Sara

  • How can I create a multi page PDF from a multi .tif file?  On the creation of a file .pdf from a file multiple .tif, the .tif file is converted to a single page (always the first page of the .tif file) .pdf.  The rest of the document is cut off. The .tif

    How can I create a multi page PDF from a multi .tif file?  On the creation of a file .pdf from a file multiple .tif, the .tif file is converted to a single page (always the first page of the .tif file) .pdf.  The rest of the document is cut off. The .tif file comes from a document by using the fax & Scan app scanner in Windows 10.  I am running Adobe Acrobat Reader DC, which I run with my subscription 'Adobe PDF package, monthly'.  It worked fine until about a month.  I've since upgraded to Windows 10 and Acrobat Reader DC.   I would be very grateful for any help. Eoghainn

    Hello

    This problem has been reported as a bug. Our team of engineers working on this priority issue.

    Kind regards
    Nicos

Maybe you are looking for