Extract attachment from input sream?

hi,
how can i retrieve image/attachment from input stream.
I am getting:
<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.csapi.org/schema/parlayx/multimedia_messaging/send/v2_4/local" xmlns:ns2="http://www.csapi.org/schema/parlayx/common/v2_1">
<soapenv:Body>
<ns1:sendMessage>
<ns1:addresses>tel:070123456789</ns1:addresses>
<ns1:senderAddress>tel:07123456789</ns1:senderAddress>
<ns1:subject>GIF89a� > � p��Hl����������+Ut������
<`Cf��������������� 2X!� , � > ��I��8����`xIbi�h�>���p��rm�"��|�����',C��r9b:��$tK@KJ�����c,8P��tQ ������ �B�_��� p|q
��
�� 4hk �����:�l�:��� ��� ��c ���*X��Y�� �,� �n ���������
���� �{|
Y�m���C��;` !�c���I| P��Z �r�= �1�F r���`Z_q 0oP�C4AP@��
08�a��>H` ��o � Z� �:-���o�4`2����WH�� X�3���`Uu�@K ���d� �A� *�d+@��lv���C6��9�U�� ������WY�"a��B�8�} Z���c,��tH���(:00�x�4Hvl�0��� 8A�H��( �X��L 7�?
�&���r�lW@m�� ��(^� ��E:�o��"0�Cu���N���
��,���]���Y6�e�]P t����\��@?�P�ud` � x����� �
�� ���I0rH�
B�*=�� 5dAi,���p7�N m����$�� �A4N8�Z����uHB�F6"o�5� ��[J�m���X-��6 � ,�@|m���c��-��' ���Ors4�hh�? ��P#���P�50��)���
V�J�bX��D�<�iU���%M������ �c� &���$G@��a@*�: $$��8M���+�����r�#��)|c��&2`V��/&X� ��0�c`��� |��w���0�N2�z���Th���F/
��lro���r��XQ�%��X.�
)Q��AT��i���P�M��Y��T�d�� ��"��� <I5�V_�H�Z�u�v|
�b��E�fS��|d�A�u ��YRu��� a2���3��S�XR0^dw���xb�U���6A�����
8�� �t�d�@���p���d�Dw ��a R�uq����%�
$�:k�W��a�H`i$.Zt_IR@{`����}�/4�n�w��.:Jr�B
�F���D;���{3W ?���U� �H�{���9�� ��AT���������[���>�%�Io�a���X���q�<P��y�� �� ��g�>�/
��$���$�S�C��"Sk���y X8�BZQ�L� �.�0\wC��� $�3��X�)� r3��e=k���q�1
+ 9��~tS��l����O���Kc����t������ 'U�OZ������
oZ������e�� �t�w�A'���7�I ���%3�AE!mc[*� �U.���<,cY�Y�2���t��\����
�)L��08&2] �e� ;
</ns1:subject>
<ns1:priority>Default</ns1:priority>
</ns1:sendMessage>
</soapenv:Body>
</soapenv:Envelope>
Please help me!
Edited by: sumitbhatnagar007 on Feb 19, 2008 2:38 AM

Try this 
http://www.infopathdev.com/blogs/ernesto/archive/2012/01/13/extract-attachments-from-your-infopath-forms.aspx
As far as I know, there isn't anything built into either SharePoint or InfoPath to do this; you would have to write code. Take a look at this article http://support.microsoft.com/kb/892730 for
how to decode the base64 encoded string of an attachment. If you're using VB.NET, you can take a look at this InfoPath newsgroup threadhttp://groups.google.com/group/microsoft.public.infopath/browse_thread/thread/310fca090e9f708f/81376114cd5ee732?hl=en&lnk=gst&q=attachment+disk+infopath#81376114cd5ee732
Once you've decoded the attachment, you can use either the WebClient class (if you're extracting from outside of SharePoint) or classes of the SharePoint Object Model (if you're extracting from somewhere inside of SharePoint) to upload the binary data
as a file to a SharePoint document library.
There are several ways to retrieve the form and extract the attachment; it all depends on your requirements and at which moment you want to do the extraction. You could use for example an ItemAdded event handler in SharePoint on the form library to do the extraction
as soon as the form has been added to the form library. You could also extract after the fact by creating a utility program (outside of SharePoint) that would retrieve all forms in a form library and do the extraction.
If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/
If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

Similar Messages

  • SharePoint mail handler could not extract attachment from a certain type of eml emails

    I found out why SharePoint mail handler could not extract attachment from a certain type of eml emails. The eml emails not working me were constructed with this structure, using one attachment as example:
    If I removed the highlighted red part, it just worked.
    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a
    Content-Type: multipart/alternative;
    boundary=--boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad
    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: base64
    {body
    text/plain in base64 string}
    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: base64
    {body
    text/html in base64 string}
    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad--
    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a
    Content-Type: multipart/mixed; boundary=--boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53
    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53
    Content-Type: application/octet-stream;
    name=attachment.pdf
    Content-Transfer-Encoding: base64
    {attachment
    in base64 string here}
    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53
    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a--
    I know little about eml file structure. Either the structure is wrong or the sharepoint has a bug!

    Also, here's the list of classes imported in my java code:
    import oracle.apps.xdo.delivery.DeliveryManager;
    import oracle.apps.xdo.delivery.DeliveryRequest;
    import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
    import oracle.apps.fnd.common.AppsContext;
    Not sure where to refer the "Attachment" class. Thanks.

  • Extract attachment from Infopath and set columns

    Good morning,
    I have a requirement to extract an attachment from an InfoPath form.  I have achieved that with no problem using these instructions -
    http://support.microsoft.com/kb/2517906
    What I would also like to do when this document gets copied over to the document library, is to also set a column (ie. customer number).  Based on this column the document gets moved to the correct folder via SPD workflow.  I'm guessing I need
    to add some additional script to the InfoPath form?

    Hi kelsnz,
    According to your description, my understanding is that you want to extract an attachment from an InfoPath form then save it into a library.
    For this issue, there is no OOB way to achieve it. I suggest you develop your own custom workflow activity to do it. Here is a similar article, please take a look at:
    http://spappdev.blogspot.in/2009/03/programatically-extract-attachments.html
    http://www.bizsupportonline.net/blog/2010/04/top-10-questions-infopath-file-attachments/ (section 6)
    Or, you can use  a third party solution to do it:
    https://askmanisha.wordpress.com/2013/10/04/extracting-info-path-attachment-using-nintex/
    http://www.deviantpoint.com/post/2009/06/06/Custom-SharePoint-Designer-workflow-for-extracting-InfoPath-attachment-fields.aspx
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Extract Attachment from Pdf

    I want to extract the files attached with pdf.I am using Assembler 7.2 . The DDX for extract is given below
    It returns the xml file with attachment file datastreams name. How can i identify that file is of what type?
    how to store that data stream ?

    As Don pointed out, you can parse the result XML which contains information about each extracted file attachment, including the unique name created for the document, the filename that was originally associated with the document, and the content type, if it was originally provided.
    The problem with using the filename for the extracted name of the document in the AssemblerResult documents map is that the filename is not guaranteed to be unique.
    You can ask for the result XML without actually extracting the file attachments (extract="false"), and then use the information from the result XML to get exactly the file attachments you want.
    The unique name created (the attachmentKey) actually provides information as to whether the file attachment was attached to the document in general or to a specific page, such as for a comment annotation.
    The attachments.xsd schema is installed in the LC ES SDK to assist with parsing.
    Here's an example result XML with one document-level and one page-level file attachment:
    <?xml version="1.0" encoding="UTF-8"?>
    <Attachments xmlns="http://ns.adobe.com/DDX/Attachments/1.0/">
    <Attachment attachmentKey="doc.source_attach.0000.0001" name="Untitled Object">
    <File creationDate="2004-08-05T01:34:18Z" mimeType="image/jpeg" modificationDate="2000-03-30T01:46:42Z" size="14359">
    <Filename fromEncoding="ISO-8859-1" success="true">Origami.jpg</Filename>
    </File>
    <Description>This is Origami.jpg, a document-level attachment.</Description>
    </Attachment>
    <Attachment attachmentKey="doc.source_attach.0003.0001">
    <File creationDate="2004-08-05T01:34:16Z" mimeType="image/gif" modificationDate="2002-09-10T01:51:22Z" size="3939">
    <Filename fromEncoding="ISO-8859-1" success="true">dog.gif</Filename>
    </File>
    <Description>This is a dog.gif from page 3</Description>
    <Page pageNumber="3">
    <Location x="532.5" y="720.75"/>
    </Page>
    </Attachment>
    </Attachments>

  • How to extract attachment from ABAP proxy and store in archive link....

    Hi Experts,
    I need to consume an incoming email attachment in the ABAP Proxy program (POP Mail  --> PI --> ABAP Proxy) and then store this file in the IBM content management server through the Archvie Link connection.
    Any idea how to implement this piece of code in ABAP?
    Regards,
    Shobhit

    Hi Shobhit
    You can get the files from Sender Mail adapter. In proxy implement the method of protocol IF_WSPROTOCOL_ATTACHMENTS as said above.
    Archive Link supports HTTP, RFC etc depends on the system you are going to use for archiving. For your case you have IBM server i think you have to do HTTP synchronous. This will be like an interface again for you.
    Why are you using ERP system in middle. I think you can directly dump data to IBM server.
    Thanks
    Gaurav

  • Extract attachment from .msg files and route from content organiser rules

    Hello All,
    I have Enabled Dropoff library to accept email.
    E-Mail have attachments .
    I need to set some content organiser rule which can extract the attachment and rute to specific folder.
    if i am wrong please correct me.
    How i can achieve ???
    Is it possible ??
     please suggest some alternate if not possible.
    Mukesh

    Hi,
    In the Oracle Manual "TEXT REFERENCE" there is in the addendum B a list of supported formats, I looked in 10.2 manual, there is no note of Outlook, if I look in 11.1 I see that Outlook is supported, see http://download-west.oracle.com/docs/cd/B28359_01/text.111/b28304/afilsupt.htm. Also ZIP,DOC, XLS are mentioned with all the versions Oracle Text supports.
    Herald ten Dam
    Superconsult.nl

  • How to extract data from OMElement object file attachment SOAP Service

    We are having Axis2 Tomcat6 Webservice on SOAP WSDL
    The Webservice method is like this
    public String uploadGpxFile(OMElement omEle) throws AxisFault {
        // Extract file attachment from omEle
       // store in database
       return "ok";
    So, I just went through the documentation and executed
    omEle.getText();
    This printed the attached data like this
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <ns:uploadGpxFileResponse xmlns:ns="..........">
             <ns:return><![CDATA[ MY REQUIRED XML DATA IS HERE ]]></ns:return>
          </ns:uploadGpxFileResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    So, I essentially want to extract this data and store in database. My simple question is how to do it!
    It sounds crazy but, I am quite new to Java. I was actually debugging client and found there is a problem in server and started fixing it!! It would be very helpful if someone helps

    Hi,
    as far as i know you have to use sql to archive your goal, i.e. write your own methods for every complex sql-statement you want to use. thats the sad thing about the whole ORM-concept.
    Greetings,
    dsp

  • How to extract data from MBO which has input parameters

    Dear All,
    I have a requirement to show the material price and material stock.I have created MBOs which takes Plant and Material as its input.
    I have to make an android native application which will show the material stock and material price according to the input Material and Plant.
    So how can I extract data from these MBOs ?

    Have you already got the BAPIs details? If yes please check their structures and see how they are related to get the desired output. You should consult an abaper for this requirement.
    Meanwhile, you can check these posts:
    A workflow Application to Release A Purchase Order...
    Developing SAP Android Mobile app from scratch - Part 1
    Regards,
    Jitendra

  • How to extract a attachment from an email

    Hello SDN,
    we receive email via the configuration of TAC SO28 and trigger a workflow. What would be a good/possible way to extract potential attachments (such as pdf's or tif's) from the email within SAP workflow?
    Are there any methods or FM's, which could extract them from the binary?
    I appreciate any advise!
    Cheers,
    Torsten

    Hi Torsten,
    Does it automatically convert to a SAP Office document? If so you could use the SAP Office apis... search for function modules names SOAPI1.
    Alternatively you may be able to use one of the OTF routines - again search on OTF for suitable function modules.
    Regards,
    Jocelyn

  • Extracting Images from EPS - Problem with the Output

    Hello,
    I got a big problem extracting images from an EPS, which has been made in InDesign. The image does not appear correct.
    Source code:
    %ALDImageFileName: Speicher:image.jpg
    %ALDImageDimensions: 30 30
    %ALDImageCropRect: 0 0 30 30
    %ALDImageCropFixed: 0 0 30 30
    %ALDImagePosition: 203.8677 344.8913 203.8677 359.2913 218.2677 359.2913 218.2677 344.8913
    %ALDImageType: 4 8
    %%BeginObject: image
    [14.4 0 0 14.4 203.868 344.891 ]ct
    snap_to_device
    Adobe_AGM_Image/AGMIMG_fl cf /ASCII85Decode fl /RunLengthDecode filter ddf
    <<
    /T 1
    /W 30
    /H 30
    /M[30 0 0 -30 0 30 ]
    /BC 8
    /D[0 1 0 1 0 1 0 1 ]
    /DS [
    [AGMIMG_fl 30 string /rs cvx /pop cvx] cvx
    [AGMIMG_fl 30 string /rs cvx /pop cvx] cvx
    [AGMIMG_fl 30 string /rs cvx /pop cvx] cvx
    [AGMIMG_fl 30 string /rs cvx /pop cvx] cvx
    /O 3
    >>
    %%BeginBinary: 1
    img
    p&G-p!<E*"!<<3"!!!&i!!30$!Vl`q!V$-m!WW3&!r`0#!Wh]h!!20]!WW3$qZ$^!!!!&f!!30$!WE'!
    !WE'$!<<*#nc/[l!W<!#!WW3%h>dNVnGiXl!<<-)!!*'"!<<2f!<*$!!<3)a!!!&t!!*-%kl:\ar;Zm"
    !!2He#6G2G(D[>Z!<*#e!!WKUEK,/l!r`0"!V$.!!Wi?'-t[mD-NjDN!!2Zk!!3#u"T\]4$OR%8!!!&h
    !!<6)*\I@D!\,8pq>g3h%KQP0';ta-rr2ho&-2b3mf3Y*Q/q,jk2D[9"76'h!=o#B!Y,22n,Nn!!!=Q!
    0.ee,0/"XS!VHHl!!E<'!"[l]rrUsd!Ug!r&'a/!k3(mej38#8mJm8&'`/UF'`J.(!"8l.+"o,p/hSe-
    /M8.8!!<6%!i#Yn!<2rs!2Ao^$NZFPk2tpjkND!jP3r;O%29TU'`o-b%e'H-!=:8,0/"h-.kN>(.gkeH
    "T^(Js8W&srrE$$rr;gE!V-4"""*$ljlY^djQYmmi$\'q!W`9(p([Q1nc/dn!#@(:r[nC..kE8)/emgU
    !<IHErs8W(rr<#trr76B!:p1!CZadBk2kmhj65^iD"%E-$5O?k'`&OE$M"0,!<<uh0.ee0/h\e,/h.k2
    !!*+arVm-$s8W)us8J2U!;Z[(L?.U[kN:sflf@0hK^f$D!=T\>'a5?f'c%2YnGit6/1iM*/1iA*.kWFi
    nc/dn!I+SBqYpWrrcdo5!<N60C$4[@ki_*hl0.?lD".K0!=9MV'c%S_'`f!Vnc01&!!t50/M8P+/h8J)
    .gH+F!!+PDrVllsrVlrp.KT,@#QauQip#Ifk3*$4ki:gb-3Nc<$j.4Z'GV>s'bqJt('F(,%06GL/hJ_.
    .k<;..j"f]!!32!rql]tr;WMmmf3c`k2tsgk2tmikEZ,Kn,NJ!'`/UJ'G_,X!V-6i!=L8*/2&S./M&=P
    !!2Ti"9AV]s8N#t"o\JY&c_t$!"-g0j6,RdkNBr!!r2ii!!!]1'a,9f'*84(!"Ar/""YuT/M8Y)!WW3$
    nc0%!!!!Z$s8N#ts76`i!"T,3!!3\bl0.?qjkC7H!!;`lrW!!#!>PMJ!u;Ub!Ug$f!=JlU/M/S*/ggZ#
    !!2Ng$3K)as8N&tjT#8]m/R@3k2b[ck03)j!>?4H'`\p6!!**(r[e6p.kWIZmJm:h!#kk:#.sp7ru_:B
    mJmV6jQ>U%kN:kH!!!)h!!!'!'`\gE'`eC:mf3^r!=pb8/ds9_.h;[J!!u[*s8GIerr6%#m/RGck3(kk
    kNM&%!Up'o!<<*)'bhDfrY5G=!Vufj!"K#0!#mOB.0(kM0,afj!V$-u!<A8^s6B[Es8S8_!U]poKBMCG
    !7'`iKECN@#RhF_'*&[\'b'X5r;[9-!$a!F*W[<7.jP)q!V-4#!<<,As8T>(W;lnB!!!&g!"63skFhmD
    jlEuS!!2Ng#S7^d%KHtR'bTm7!s/H(/-mj['`\n!/1Ukk!"985s8@'?Du]k7%KHP#!"8l0$KC71C'%l,
    jl$a?!!<6%!!3'6!X\o6rY5J8!!2Qh#Ri::0*_I`/1U`S%.4)q5Q:Zg2ukf6s8P=a!V$-t!]]?)jY?ff
    kN:qhmJmFp()7Pf!!N99!!Vcj$l1NL.KKPM/1iIi!!3'!o`,F%!dakFpBL[$pAb/A!Up's!H@5cf`qK\
    hWF!BmJmV%'GV;_!!*`J'FFm3!!WH(!?WpE,Q7ZH+tP;f!!2foq>^W-s8Tn6!!L"8s0r.!!">[bkcXsf
    !3>;FU]CPd!!<]G'bL?E!tZ.^&+9K$!\#`P)?'U>'eM$g!!2Zk!W`9$$g.KhLB.ATL&_2?"7Q9n!RU)n
    I/X*KGN@l9"Rc<t',;8j!!!$,'bhAP!!WQ+!"US5%fQG1%PKFQn,NUm!*fL'9)\en8,rO]!V-4"!rrBu
    jQ/].!WYOLl&b?6"9AcD'aFX;"9oSU%0>nt$NV(q!rr<%"YC_q"7Z@"!<<+Eq@Wc/!#,C9"9&;k!!E?)
    D;u0+!!<qtS-&0["T\T'$5EXA!!33:%da5t!<<]/!!3u<!V$-o!<<*#!FZ$-!!A;d!!2ipq#CKu!<?7$
    !!WK)KEM8T"RZ6i$2so,!<<Q0li77k!!30$!<</h!!!'!!!E<'!!!&c!"8o/!!*'#"98E'!WW;h!!!'!
    !!NB'!<<*#n,N[o!<<*#!!!'!!!!&f!!E<&!!*-"!!!'!!!**%o)K!s!!*-$!<<*#!!<-"!Wi?&l2Ueb
    rVup!q#Gp~>
    %%EndBinary
    %%EndObject
    Orginal image Size 553,9 KB
    After decoding the size is only 1,8 KB
    First try.
    public class ASCII85Decode {
    private ByteBuffer buf;
    * initialize the decoder with byte buffer in ASCII85 format
    private ASCII85Decode(ByteBuffer buf) {
    this.buf = buf;
    * get the next character from the input.
    * @return the next character, or -1 if at end of stream
    private int nextChar() {
    // skip whitespace
    // returns next character, or -1 if end of stream
    while (buf.remaining() > 0) {
    char c = (char) buf.get();
    if (!isWhiteSpace(c)) {
    return c;
    // EOF reached
    return -1;
    public static boolean isWhiteSpace(int c) {
    return (c == ' ' || c == '\t' || c == '\r' || c == '\n'
    || c == 0 || c == 12);
    // 0=nul, 12=ff
    * decode the next five ASCII85 characters into up to four decoded
    * bytes.  Return false when finished, or true otherwise.
    * @param baos the ByteArrayOutputStream to write output to, set to the
    *        correct position
    * @return false when finished, or true otherwise.
    private boolean decode5(ByteArrayOutputStream baos)
    throws PDFParseException {
    // stream ends in ~>
    int[] five = new int[5];
    int i;
    for (i = 0; i < 5; i++) {
    five[i] = nextChar();
    if (five[i] == '~') {
    if (nextChar() == '>') {
    break;
    } else {
    throw new PDFParseException(
    "Bad character in ASCII85Decode: not ~>");
    } else if (five[i] >= '!' && five[i] <= 'u') {
    five[i] -= '!';
    } else if (five[i] == 'z') {
    if (i == 0) {
    five[i] = 0;
    i = 4;
    } else {
    throw new PDFParseException(
    "Inappropriate 'z' in ASCII85Decode");
    } else {
    throw new PDFParseException(
    "Bad character in ASCII85Decode: " + five[i]
    + " (" + (char) five[i] + ")");
    if (i > 0) {
    i -= 1;
    int value = five[0] * 85 * 85 * 85 * 85 + five[1] * 85 * 85
    * 85 + five[2] * 85 * 85 + five[3] * 85 + five[4];
    for (int j = 0; j < i; j++) {
    int shift = 8 * (3 - j);
    baos.write((byte) ((value >> shift) & 0xff));
    return (i == 4);
    * decode the bytes
    * @return the decoded bytes
    private ByteBuffer decode() throws PDFParseException {
    // start from the beginning of the data
    buf.rewind();
    // allocate the output buffer
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    // decode the bytes
    while (decode5(baos)) {
    return ByteBuffer.wrap(baos.toByteArray());
    * decode an array of bytes in ASCII85 format.
    * <p>
    * In ASCII85 format, every 5 characters represents 4 decoded
    * bytes in base 85.  The entire stream can contain whitespace,
    * and ends in the characters '~&gt;'.
    * @param buf the encoded ASCII85 characters in a byte buffer
    * @param params parameters to the decoder (ignored)
    * @return the decoded bytes
    public static ByteBuffer decode(ByteBuffer buf)
    throws PDFParseException {
    ASCII85Decode me = new ASCII85Decode(buf);
    return me.decode();
    2. Try
    public class Ascii85Decode {
    private final FileOutputStream fos;
    private Ascii85Decode() throws FileNotFoundException {
    File f = new File("/home/markus/1/test/bild.jpg");
    fos = new FileOutputStream(f);
    @Override
    protected void finalize() throws Throwable {
    fos.close();
    super.finalize();
    public static byte[] decode(byte[] in) throws FileNotFoundException, IOException {
    Ascii85Decode ascii85Decode = new Ascii85Decode();
    ascii85Decode.setData(in);
    ascii85Decode.decode85();
    return null;
    static long pow85[] = {85 * 85 * 85 * 85, 85 * 85 * 85, 85 * 85, 85, 1};
    private byte[] in;
    private void setData(byte[] in) {
    this.in = in;
    void wput(long tuple, int bytes) throws IOException {
    switch (bytes) {
    case 4:
    putchar((int) (tuple >> 24));
    putchar((int) (tuple >> 16));
    putchar((int) (tuple >> 8));
    putchar((int) tuple);
    break;
    case 3:
    putchar((int) (tuple >> 24));
    putchar((int) (tuple >> 16));
    putchar((int) (tuple >> 8));
    break;
    case 2:
    putchar((int) (tuple >> 24));
    putchar((int) (tuple >> 16));
    break;
    case 1:
    putchar((int) (tuple >> 24));
    break;
    void decode85() throws IOException {
    long tuple = 0;
    int c, count = 0;
    int i=0;
    for (;;) {
    switch (c = in[i]) {
    default:
    if (c < '!' || c > 'u') {
    System.err.println("%s: bad character in ascii85 region: %#o\n");
    System.exit(1);
    tuple += (c - '!') * pow85[count++];
    if (count == 5) {
    wput(tuple, 4);
    count = 0;
    tuple = 0;
    break;
    case 'z':
    if (count != 0) {
    System.err.println("%s: z inside ascii85 5-tuple\n");
    System.exit(1);
    putchar(0);
    putchar(0);
    putchar(0);
    putchar(0);
    break;
    case '~':
    if (in[i+1] == '>') {
    if (count > 0) {
    count--;
    tuple += pow85[count];
    wput(tuple, count);
    c = in[i+1];
    return;
    System.err.println("%s: ~ without > in ascii85 section\n");
    System.exit(1);
    case '\n':
    case '\r':
    case '\t':
    case ' ':
    case '\0':
    case '\f':
    case '\b':
    case 0177:
    break;
    i++;
    private void putchar(int l) throws IOException {
    //System.out.write(l);
    fos.write(l);
    Does anybody have an idea to solve the problem?

    A scan from string function can be used as per the attachment. The double \ ('\\') is in the format string in order to interpret the '\' characters in your input string as literal characters and not special formatting.
    Message Edited by Dennis Knutson on 07-10-2006 03:53 PM
    Attachments:
    Scan From String.JPG ‏5 KB

  • Is there a way to extract data from one of e.g. 7 rows from the multicolumn listbox?

    is there a way to extract data from one of e.g. 7 rows from the multicolumn listbox?

    All the data can be extracted by creating a property node and read the Item Names property...then you get a 2D array of all the rows and columns. Wire that array into an index array function and input the row you want (e.g. the listbox value, if you want the row currently selected...)...that's it. See attached example.
    MTO
    Attachments:
    ExtractRow.vi ‏24 KB

  • How to extract text from a PDF file?

    Hello Suners,
    i need to know how to extract text from a pdf file?
    does anyone know what is the character encoding in pdf file, when i use an input stream to read the file it gives encrypted characters not the original text in the file.
    is there any procedures i should do while reading a pdf file,
    File f=new File("D:/File.pdf");
                   FileReader fr=new FileReader(f);
                   BufferedReader br=new BufferedReader(fr);
                   String s=br.readLine();any help will be deeply appreciated.

    jverd wrote:
    First, you set i once, and then loop without ever changing it. So your loop body will execute either 0 times or infinitely many times, writing the same byte every time. Actually, maybe it'll execute once and then throw an ArrayIndexOutOfBoundsException. That's basic java looping, and you're going to need a firm grip on that before you try to do anything as advanced as PDF reading. the case.oops you are absolutely right that was a silly mistake to forget that,
    Second, what do the docs for getPageContent say? Do they say that it simply gives you the text on the page as if the thing were a simple text doc? I'd be surprised if that's the case.getPageContent return array of bytes so the question will be:
    how to get text from this array? i was thinking of :
        private void jButton1_actionPerformed(ActionEvent e) {
            PdfReader read;
            StringBuffer buff=new StringBuffer();
            try {
                read = new PdfReader("d:/getjobid2727.pdf");
                read.getMetaData();
                byte[] data=read.getPageContent(1);
                int i=0;
                while(i>-1){ 
                    buff.append(data);
    i++;
    String str=buff.toString();
    FileOutputStream fos = new FileOutputStream("D:/test.txt");
    Writer out = new OutputStreamWriter(fos, "UTF8");
    out.write(str);
    out.close();
    read.close();
    } catch (Exception f) {
    f.printStackTrace();
    "D:/test.txt"  hasn't been created!! when i ran the program,
    is my steps right?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Not able to run a program to extract news from news channel websites.

    Let me start with stating the fact that I am a super greenhorn, so please be ultra elaborate with the answers .
    This is my code, I copied it from Mr. Alvin Alexander (http://alvinalexander.com/java/edu/pj/pj010011?). I am trying to use it to extract news from news channel websites.
    I used the following URLs:
    1.http://in.reuters.com/
    2.http://timesofindia.indiatimes.com/
    3.http://www.hindustantimes.com/
    // JavaGetUrl.java: //
    // A Java program that demonstrates a procedure that can be //
    // used to download the contents of a specified URL. //
    // Code created by Developer's Daily //
    //  http://www.DevDaily.com  //
    import java.io.*;
    import java.net.*;
    public class JavaGetUrl {
      public static void main (String[] args) {
      // Step 1: Start creating a few objects we'll need.
      URL u;
      InputStream is = null;
      DataInputStream dis;
      String s;
      try {
      // Step 2: Create the URL. //
      // Note: Put your real URL here, or better yet, read it as a //
      // command-line arg, or read it from a file. //
      u = new URL("http://200.210.220.1:8080/index.html");
      // Step 3: Open an input stream from the url. //
      is = u.openStream(); // throws an IOException
      // Step 4: //
      // Convert the InputStream to a buffered DataInputStream. //
      // Buffering the stream makes the reading faster; the //
      // readLine() method of the DataInputStream makes the reading //
      // easier. //
      dis = new DataInputStream(new BufferedInputStream(is));
      // Step 5: //
      // Now just read each record of the input stream, and print //
      // it out. Note that it's assumed that this problem is run //
      // from a command-line, not from an application or applet. //
      while ((s = dis.readLine()) != null) {
      System.out.println(s);
      } catch (MalformedURLException mue) {
      System.out.println("Ouch - a MalformedURLException happened.");
      mue.printStackTrace();
      System.exit(1);
      } catch (IOException ioe) {
      System.out.println("Oops- an IOException happened.");
      ioe.printStackTrace();
      System.exit(1);
      } finally {
      // Step 6: Close the InputStream //
      try {
      is.close();
      } catch (IOException ioe) {
      // just going to ignore this one
      } // end of 'finally' clause
      } // end of main
    } // end of class definition
    This is the error i am getting, every time I run it on Eclipse:
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.net.NetworkClient.doConnect(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.<init>(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at java.net.URL.openStream(Unknown Source)
      at JavaGetUrl.main(JavaGetUrl.java:33)
    Also, when I try a local server URL, the output screen goes blank, which I guess is due to lack of Text on the local URL. So, the little research that I did, made me believe that the code not running on external server was due to firewall on the server side. Please help me run it. Also : I work on a proxy network.( if that has something to do with this).
    P.S : Advanced gratitude for any assistance.

    any decently secured server would reject such a blatant attempt to steal its content.

  • How to extract data from a structure?(Data Dictionary)

    Hi all,
           This is regarding extracting data from a structure.
    For Eg:if we want to extract data from a structure ADDR1_DATA,How will we do that in report programming?Structures on its own has no existence unless it s attached to a database table or view.when am using 'Where used List' on that structure also I am not getting any database tables or views.What can I do about this?
    Thanking you,
    anjaly

    HI Anjaly,
    as you said structure does not have any value .. unless something is added to it..
    So just use the structure to define the type of the sttructure you want..
    Or to include it in your itab like..
    data : Begin of itab occurs 0.
           include structure ADDR1_DATA.
    data  i type i.
           end of itab.
    you cannot directly extract data from the  structure ADDR1_DATA..
    regards
    satesh

  • How to extract data from Chart History?

    Dear all, I have read a lot of posts, but still don't understand how to extract data from Chart history.
    Suppose you acquired 1024 points of data every time, then use "build array" to build an array, then send to intensity chart to show, then save the history into a .txt file,  but how to extact data from the file?
    How Labview store the data in the 2D history buffer?
    Anybody has any examples?

    The simplest would be to save the 2D array as a spreadsheet file, the read it back the same way.
    Maybe the attached simple example can give you some ideas (LabVIEW 7.1). Just run it. At any time, press "write to file". At any later time, you can read the save data into the second history chart.
    If you are worried about performance, it might be better to use binary files, but it will be a little more complicated. See how far you get.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IntensityChartHistorySave.vi ‏79 KB

Maybe you are looking for

  • ETA for Windows 8 Thinkvantage software and drivers?

    Hello, I realize Windows 8 just went gold at the beginning of the month, but what is the release plan for drivers and software for the ThinkPads?  I'll have the released product next Wednesday when it hits the MSDN download center. Are we going to ha

  • In search of FCP 5.1.4 upgrade...?

    I'm working on an editing project that involves two editors with two different editing stations. I'm using FCP 5.1.4, and my associate is using FCP 5.1. Last night, we tried to open a project created on a FCP 5.1.4 with Mac loaded with FCP 5.1, and r

  • Include another web page content

    Hi All, I'm currently looking for a new job, but there are sooooo many job sites. I want create a .jsp to go to all the different sites and select the "search" for me to show it all in one big page. eg. If I pass it this string "http://forum.java.sun

  • Business Catalyst and Facebook problem

    I have seen threads on this subject as well as the articles, but I am not certain the problem was answered. I have added a Facebook "like" button to my Large Product Display (and the button works). The large product display has several upsell/cross-s

  • Captivate freezing Error Message

    Hi, Captivate continues to freeze randomly through projects. I get the error "A fatal error has occured and the application is being terminated. Adobe Captivate has tried to save all your work in the respective project folders as ".cpbackup" files. P