Issue with reading byte array

I have a binary file to be read.I want to read the whole file into a byte array. But while doing so the values which are greater than 128 are read as negative values as we have Signedbyte in java(-127 to 128).
So I tried reading the bytes into the int array as shown in the below code.
int i = 0;
     int content[]= new int[(int)size];
     FileInputStream fstream = new FileInputStream(fileName);
     DataInputStream in = new DataInputStream(fstream);
     while(i<size)
     content= in.readUnsignedByte();
     i++;
The above function 'readUnsignedByte();' reads byte and stores it into an int array.....But since the file contains around 34000 bytes ....the loop runs 340000 times .....which is a performance hazard.
After googling for hours ....I could still not find any alternative ....
I want to read byte and want to store in int array but instead of loop, I want to read the file at once.
Or is there any way to implement Unsigned Byte in java so that I can read the entire file in byte array without corrupting the values which are greater than 128..
I have to deliver the code asap .....Please help me out with an alternative solution for this...
Thanks in advance....

Thanks for replying ......
Actually, I need to take the bytes into an array(int or byte array) with decimal values and further process these decimal values.......
but while reading the file into a byte array the decimal values get corrupted(in case when I read a number greater than 128) but in this case I am able to read the whole file at once(without using any loop) as done by the following code
     FileInputStream fstream = new FileInputStream(fileName);
     DataInputStream in = new DataInputStream(fstream);
     byte b[] = null;
     in.readFully(b);
and while reading the file in int array as done in the below code is inefficient as the number of times the loop runs is more than 34000..... please suggest me some alternative.
int i = 0;
     int content[]= new int[(int)size];
     FileInputStream fstream = new FileInputStream(fileName);     
     DataInputStream in = new DataInputStream(fstream);
     while(i<size)
               content= in.readUnsignedByte();
               i++;

Similar Messages

  • Strange issue with POF: byte array with the value 94

    This is a somewhat strange issue we’ve managed to reduce to this test case. We’ve also seen similar issues with chars and shorts as well. It’s only a problem if the byte value inside the byte array is equal to 94! A value of 93, 95, etc, seems to be ok.
    Given the below class, the byte values both in the array and the single byte value are wrong when deserializing. The value inside the byte array isn’t what we put in (get [75] instead of [94]) and the single byte value is null (not 114).
    Pof object code:
    package com.test;
    import java.io.IOException;
    import java.util.Arrays;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    public class PofObject1 implements PortableObject {
         private byte[] byteArray;
         private byte byteValue;
         public void setValues() {
              byteArray = new byte[] {94};
              byteValue = 114;
         @Override
         public void readExternal(PofReader reader) throws IOException {
              Object byteArray = reader.readObjectArray(0, null);
              Object byteValue = reader.readObject(1);
              System.out.println(Arrays.toString((Object[])byteArray));
              System.out.println(byteValue);
              if (byteValue == null) throw new IOException("byteValue is null!");
         @Override
         public void writeExternal(PofWriter writer) throws IOException {
              writer.writeObject(0, byteArray);
              writer.writeObject(1, byteValue);
    Using writer.writeObjectArray(0, byteArray); instead of writer.writeObject(0, byteArray); doesn't help. In this case byteArray would be of type Object[] (as accessed through reflection).
    This is simply put in to a distributed cache and then fetched back. No EPs, listeners or stuff like that involved:
         public static void main(String... args) throws Exception {
              NamedCache cache = CacheFactory.getCache("my-cache");
              PofObject1 o = new PofObject1();
              o.setValues();
              cache.put("key1", o);
              cache.get("key1");
    Only tried it with Coherecne 3.7.1.3.
    Cache config file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>my-cache</cache-name>
                   <scheme-name>my-cache</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>
              <distributed-scheme>
                   <scheme-name>my-cache</scheme-name>
                   <service-name>my-cache</service-name>
                   <serializer>
                        <class-name>
                             com.tangosol.io.pof.ConfigurablePofContext
                        </class-name>
                        <init-params>
                             <init-param>
                                  <param-type>string</param-type>
                                  <param-value>pof-config.xml</param-value>
                             </init-param>
                        </init-params>
                   </serializer>
                   <lease-granularity>thread</lease-granularity>
                   <thread-count>10</thread-count>
                   <backing-map-scheme>
                        <local-scheme>
                        </local-scheme>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
         </caching-schemes>
    </cache-config>
    POF config file:
    <?xml version="1.0"?>
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
         xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config coherence-pof-config.xsd">
         <user-type-list>
              <!-- coherence POF user types -->
              <include>coherence-pof-config.xml</include>
              <user-type>
                   <type-id>1460</type-id>
                   <class-name>com.test.PofObject1</class-name>
              </user-type>
         </user-type-list>
    </pof-config>

    Hi,
    POF uses certain byte values as an optimization to represent well known values of certain Object types - e.g. boolean True and False, some very small numbers, null etc... When you do read/write Object instead of using the correct method I suspect POF gets confused over the type and value that the field should be.
    There are a number of cases where POF does not know what the type is - Numbers would be one of these, for example if I stored a long of value 10 on deserialization POF would not know if that was an int, long double etc... so you have to use the correct method to get it back. Collections are another - If you serialize a Set all POF knows is that you have serialized some sort of Collection so unless you are specific when deserializing you will get back a List.
    JK

  • Search issue with dynamic dropdown array - PHP

    I'm currently trying to set up a search with a couple of
    dynamic dropdowns, basically to search for cars - so the parent
    list is car make, and the child is car model.
    I've gotten as far as a page with the dynamic array working,
    but not the search :
    dynamic array
    working
    (Ignore the cars and vans radio buttons)
    For testing there's an Audi A3 and and Audi A6, but this
    search doesn't work.
    The select code looks like :
    <select name="Model">
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    </select>
    And the array code looks like :
    <?php
    if ($row_rsModels) {
    echo "<SC" . "RIPT>\n";
    echo "var WAJA = new Array();\n";
    $oldmainid = 0;
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid == $newmainid) {
    $oldmainid = "";
    $n = 0;
    while ($row_rsModels) {
    if ($oldmainid != $newmainid) {
    echo "WAJA[".$n."] = new Array();\n";
    echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
    $m = 1;
    echo "WAJA[".$n."][".$m."] = new Array();\n";
    echo "WAJA[".$n."][".$m."][0] =
    "."'".WA_DD_Replace($row_rsModels["ModelID"])."'".";\n";
    echo "WAJA[".$n."][".$m."][1] =
    "."'".WA_DD_Replace($row_rsModels["Model"])."'".";\n";
    $m++;
    if ($oldmainid == 0) {
    $oldmainid = $newmainid;
    $oldmainid = $newmainid;
    $row_rsModels = mysql_fetch_assoc($rsModels);
    if ($row_rsModels) {
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid != $newmainid) {
    $n++;
    echo "var rsModels_WAJA = WAJA;\n";
    echo "WAJA = null;\n";
    echo "</SC" . "RIPT>\n";
    function WA_DD_Replace($startStr) {
    $startStr = str_replace("'", "|WA|", $startStr);
    $startStr = str_replace("\\", "\\\\", $startStr);
    $startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
    return $startStr;
    ?>
    ..to try and find the root of the problem, I've gotten as far
    as a similar page, without the dynamic
    array, with the child dropdown populated dynaically from the
    recordset :
    search working
    This seems to work exactly as advertised - all the car models
    are listed from the recordset, and if
    you search for Audi and A3, then it gets returned correctly.
    The select code here looks like :
    <select name="Model" id="Model">
    <option value="">Select a Model</option>
    <?php
    do {
    ?>
    <option value="<?php echo
    $row_rsModels['Model']?>"><?php echo
    $row_rsModels['Model']?
    ></option>
    <?php
    } while ($row_rsModels = mysql_fetch_assoc($rsModels));
    $rows = mysql_num_rows($rsModels);
    if($rows > 0) {
    mysql_data_seek($rsModels, 0);
    $row_rsModels = mysql_fetch_assoc($rsModels);
    ?>
    </select>
    ..so I guess the search is set up OK, but the issue is with
    how to pass the model from the select code generated by the dynamic
    array correctly....
    Its presumably because the option value is empty :
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    So I've been trying various possibilities with no joy, such
    as :
    <?php if (!(strcmp("", $row_rsModels['Model']))) {echo
    "selected=\"selected\"";} ?>
    but without success.
    Even then, I'd have though if the value was empty, "", then
    it would return all results, rather than no results....?
    hope that makes some sense, and someone can shed some
    light...
    Cheers.

    Thomas Jung wrote:>
    > >
    Chris Paine wrote:
    > > That's a shame!
    > >
    > > Does this mean that using a drop down by index in an ALV is limited to having the same dropdown in every row of the table (it would certainly seem that this is the case).
    > >
    > > Cheers,
    > >
    > > Chris
    >
    > I would assume so as I can't think of a way around the subnode limitation. The system will actually allow you to have a subnode and everything works fine until you sort the ALV - then you get a short dump.
    >
    > I suppose you would have to fall back to using a regular table in this case.
    But how come the class documentation says its possible.
    Functionality
    Using class CL_SALV_WD_UIE_DROPDOWN_BY_IDX, you make all the settings for the UI element index-based dropdown list box, from which the user can select from a range of values.
    *You use the index-based dropdown list box if the dropdown list boxes in each cell of the column are to contain different entries.*
    You use the key-based dropdown list box if the dropdown list boxes in each cell of the column are to contain the same entries.
    To specify the entries in the dropdown list boxes, the context of your application requires an attribute for which the data type satisfies the following requirements:
    The attribute is a table
    The structure of this table contains at least one KEY column and a VALUE column.
    Note
    We recommend that you use the type WDY_KEY_VALUE_TABLE here.

  • Issue with "read by other session" and a parallel MERGE query

    Hi everyone,
    we have run into an issue with a batch process updating a large table (12 million rows / a few GB, so it's not that large). The process is quite simple - load the 'increment' from a file into a working table (INCREMENT_TABLE) and apply it to the main table using a MERGE. The increment is rather small (usually less than 10k rows), but the MERGE runs for hours (literally) although the execution plan seems quite reasonable (can post it tomorrow, if needed).
    The first thing we've checked is AWR report, and we've noticed this:
    Top 5 Timed Foreground Events
    Event     Waits     Time(s)     Avg wait (ms)     % DB time     Wait Class
    DB CPU           10,086           43.82     
    read by other session     3,968,673     9,179     2     39.88     User I/O
    db file scattered read     1,058,889     2,307     2     10.02     User I/O
    db file sequential read     408,499     600     1     2.61     User I/O
    direct path read     132,430     459     3     1.99     User I/OSo obviously most of the time was consumed by "read by other session" wait event. There were no other queries running at the server, so in this case "other session" actually means "parallel processes" used to execute the same query. The main table (the one that's updated by the batch process) has "PARALLEL DEGREE 4" so Oracle spawns 4 processes.
    I'm not sure how to fix this. I've read a lot of details about "read by other session" but I'm not sure it's the root cause - in the end, when two processes read the same block, it's quite natural that only one does the physical I/O while the other waits. What really seems suspicious is the number of waits - 4 million waits means 4 million blocks, 8kB each. That's about 32GB - the table has about 4GB, and there are less than 10k rows updated. So 32 GB is a bit overkill (OK, there are indexes etc. but still, that's 8x the size of the table).
    So I'm thinking that the buffer cache is too small - one process reads the data into cache, then it's removed and read again. And again ...
    One of the recommendations I've read was to increase the PCTFREE, to eliminate 'hot blocks' - but wouldn't that make the problem even worse (more blocks to read and keep in the cache)? Or am I completely wrong?
    The database is 11gR2, the buffer cache is about 4GB. The storage is a SAN (but I don't think this is the bottleneck - according to the iostat results it performs much better in case of other batch jobs).

    OK, so a bit more details - we've managed to significantly decrease the estimated cost and runtime. All we had to do was a small change in the SQL - instead of
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y' AND S.DIFF_FLAG IN ('U', 'D'))
      ...(which is the query listed above) we have done this
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB AND DIFF_FLAG IN ('U', 'D')) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y')
      ...i.e. we have moved the condition from the MERGE ON clause to the SELECT. And suddenly, the execution plan is this
    OPERATION                           OBJECT_NAME             OPTIONS             COST
    MERGE STATEMENT                                                                 239
      MERGE                             T_NOTUNIFIED_CLIENT
        PX COORDINATOR
          PX SEND                       :TQ10000                QC (RANDOM)         239
            VIEW
              NESTED LOOPS                                      OUTER               239
                PX BLOCK                                        ITERATOR
                  TABLE ACCESS          TMP_SODW_BB             FULL                2
                    Filter Predicates
                      OR
                        DIFF_FLAG='D'
                        DIFF_FLAG='U'
                  TABLE ACCESS          T_NOTUNIFIED_CLIENT       BY INDEX ROWID    3
                    INDEX               AK_UQ_NOTUNIF_T_NOTUNI    RANGE SCAN        2
                      Access Predicates
                        AND
                          D.NCLIENT_KEY(+)=NCLIENT_KEY
                          D.CURRENT_RECORD(+)='Y'
                      Filter Predicates
                        D.CURRENT_RECORD(+)='Y' Yes, I know the queries are not exactly the same - but we can fix that. The point is that the TMP_SODW_BB table contains 1639 rows in total, and 284 of them match the moved 'IN' condition. Even if we remove the condition altogether (i.e. 1639 rows have to be merged), the execution plan does not change (the cost increases to about 1300, which is proportional to the number of rows).
    But with the original IN condition (that turns into an OR combination of predicates) in the MERGE ON clausule, the cost suddenly skyrockets to 990.000 and it's damn slow. It seems like a problem with cost estimation, because once we remove one of the values (so there's only one value in the IN clausule), it works fine again. So I guess it's a planner/estimator issue ...

  • Issue with reading emails state.

    Dear community,
    in my company, we have BB to bring a very good 24hrs service to our customer, but the thing is that we started to have an issue with our BB and the Microsoft Office 365 and Exchange service.
    We have BlackBerry Enterprise service activated on each blackberry, so we receive every email in our BBs.
    But, when we read an email, after you go back to the mailbox, it appears as un-read again. Then, if you read it again, and go back to the mailbox, it appears as read.
    DO you know why it's happening?.
    Thanks in advance,

    Hi,
    Use TRY & CATCH statements before OPEN DATASET...
    For exact syntax check F1 help on try & catch...
    TRY.
      CATCH.
        OPEN DATASET..
      endcatch.
    endtry.
    Hope it helps!!
    Rgds,
    Pavan

  • Unable 2 read bytes array of images

    I have made a client application which will
    receive an image from server
    the mobile app (clent) is reveiving bytes array in emulator
    but unable 2 receive it in real application...
    message = new byte[2073]; //string 2 read pic;
    for(i=0;i<2073;i++)
    //read pic array byte by byte
    x=is.read(); //(is is an input stream)
    message= (byte)x;
    // also tried this
    //is.read(message)
    works fine in emulator but not in real appication in sony erricson k310i

    sorry actually code was.....
    for reading byte by byte...............
    message = new byte[2073]; //string 2 read pic;
    for(a=0;a<2073;a++)
    //read pic array byte by byte
    x=is.read(); //(is is an input stream)
    message[a]= (byte)x; //problem in last post i[] //converting it into italic
    //for reading whole array message
    // also tried this
    is.read(message)
    and i think there shall be no problem in converting an[b] int into byte

  • Sending command apdu with a byte array as CDATA

    Hi,
    I am learning java card as part of my final year project. So far I think I can do most of the basic things but I have got stuck at one particular point.
    I know that there are different constructors for creating a command apdu object and a number of these constructors take an array of bytes as CDATA values.
    My problem is, how to access this array of data in the card side because apdu.getBuffer() returns an array of integers (bytes)? And what is actually on apdu.getBuffer()[ISO7816.OFFSET_CDATA)] location when you send command apdu object using such a constuctor?
    regards
    Edited by: 992194 on 06-Mar-2013 06:12

    992194 wrote:
    (..) I should have mentioned earlier that my card use jc 2.2.1 version, and i have read from different places that this version does not support ExtendedLength facility.Indeed.
    Also I understand the semantics of apdu.getBuffer()[ISO7816.OFFSET_CDATA] that is the first byte of the command data. My question is, this command data was initially supplied as an array of bytes. Something like this:
    +new CommandAPDU(CLA, INS, P1, P2, DATA_ARRAY, Le)+
    So when you call:
    byte [] buffer = apdu.getBuffer()
    So does this mean that the byte values inside DATA_ARRAY automatically occupy locations +buffer[ISO7816.OFFSET_CDATA]+ onwards inside the buffer?Yes. The length would be<tt> (short)(buffer[ISO7816.OFFSET_LC]&0xFF) </tt>. Notice the<tt> &0xFF </tt> is a must above 127 bytes.
    Or their is a mechanism of extracting the DATA_ARRAY array itself?No.
    In fact, in the interest of performance and portability in environments with little memory, the usual coding style is to pass<tt> buffer </tt>, an offset within that, and the length; rather than making an object, which would require a copy. Welcome to the real world of Java Card.

  • Crystal XI R2 exporting issues with double-byte character sets

    NOTE: I have also posted this in the Business Objects General section with no resolution, so I figured I would try this forum as well.
    We are using Crystal Reports XI Release 2 (version 11.5.0.313).
    We have an application that can be run using multiple cultures/languages, chosen at login time. We have discovered an issue when exporting a Crystal report from our application while using a double-byte character set (Korean, Japanese).
    The original text when viewed through our application in the Crystal preview window looks correct:
    性能 著概要
    When exported to Microsoft Word, it also looks correct. However, when we export to PDF or even RPT, the characters are not being converted. The double-byte characters are rendered as boxes instead. It seems that the PDF and RPT exports are somehow not making use of the linked fonts Windows provides for double-byte character sets. This same behavior is exhibited when exporting a PDF from the Crystal report designer environment. We are using Tahoma, a TrueType font, in our report.
    I did discover some new behavior that may or may not have any bearing on this issue. When a text field containing double-byte characters is just sitting on the report in the report designer, the box characters are displayed where the Korean characters should be. However, when I double click on the text field to edit the text, the Korean characters suddenly appear, replacing the boxes. And when I exit edit mode of the text field, the boxes are back. And they remain this way when exported, whether from inside the design environment or outside it.
    Has anyone seen this behavior? Is SAP/Business Objects/Crystal aware of this? Is there a fix available? Any insights would be welcomed.
    Thanks,
    Jeff

    Hi Jef
    I searched on the forums and got the following information:
    1) If font linking is enabled on your device, you can examine the registry by enumerating the subkeys of the registry key at HKEY_LOCAL_MACHINEu2013\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink to determine the mappings of linked fonts to base fonts. You can add links by using Regedit to create additional subkeys. Once you have located the registry key that has just been mentioned, from the Edit menu, Highlight the font face name of the font you want to link to and then from the Edit menu, click Modify. On a new line in the dialog field "Value data" of the Edit Multi-String dialog box, enter "path and file to link to," "face name of the font to link".u201D
    2) "Fonts in general, especially TrueType and OpenType, are u201CUnicodeu201D.
    Since you are using a 'true type' font, it may be an Unicode type already.However,if Bud's suggestion works then nothing better than that.
    Also, could you please check the output from crystal designer with different version of pdf than the current one?
    Meanwhile, I will look out for any additional/suitable information on this issue.

  • Issue with building an array from a cfhttp request result.

    Here is what I am trying to do. Retrieve a bunch of results from a  REST request. Run a query to see if I should be excluding any of the xmltext entries coming back from the rest request. Build an array of the REST xmltext entries except the entries in the cfquery.
    I have it all workign except building the array minus the entries that came back in the cfquery. Here is my code so far.
    <cfquery name="getqueue" datasource="#application.settings.dsn#">
    select * from friends
    where Deactivatedate < #DATEADD('d', 1, CreateODBCDateTime(now()))#
    </cfquery>
    <cfoutput query = "getqueue">
    <cfhttp  blah blah>
    <cfset nodes_parse = XmlParse(CFHTTP.FileContent)>
    <cfset Nodes = xmlSearch(nodes_parse,'friends/friend/date/activedate/')>
    <cfset roleArray = ArrayNew(1)>
    <cfloop from="1" to="#arraylen(Nodes)#" index="i">
       <cfset NodeXML = xmlparse(Nodes[i])>
    <cfset ArrayAppend(roleArray, '[sel_members][]=#NodeXML.activedate.xmlText#&')>
    </cfloop>
    </cfoutput>
    My issue is down in the loop where I do the arrayappend. How would I build an array of values coming back from the cfhttp request but not include any of them if they match up with anything coming back from the getqueue query?

    What about the obvious? Namely,
    <cfif value_from_getqueue IS NOT value_from_cfhttp_request>
    <cfset arrayAppend()>
    </cfif>

  • Modbus - Issues with Reading Holding Registers

    I am trying to read the holding registers on a RS485 2 wire modbus power monitor (Veris Industries E50C2).I am receiving bytes from the device so there appears to be communication. However, the response string is the exact same string as my command string. For instance, I am sending the hexadecimal string 0103 0000 0005 in order to read the first 5 holding registers, but I am receiving this exact same string back via the read VISA read function. I have attached an image of my VI. I would expect to see the response as "0103 (the device ID and command) followed by the number of bytes to follow and the contents of the holding registers.
    The VI is running on a cRIO 9012 with 9111 chassis. I am using the 9871 c-series RS485/RS422 interface module.
    Any ideas what the issue may be?
    Kind Regards
    Adam
    Attachments:
    Modbus VI.png ‏15 KB

    I indeed manage to fix the issue for myself.
    I used the same method you are starting right now, i conencted the NI9871 to the rs485 adapter given by the supplier and tried sending and reading my own signals.
    After much hassle and some changes to your (and my) initial vi setup as shown in your first post, everything worked out fine:
    (see the attached picture)
    1. I used the NI modbus VIs, but it worked as well with the normal visa commands and building the modbus command on your own, but  way easier with the NI VIs.
    2. i added the function to resize the buffer to its maximum size (not sure if thats actually helping with anything, but better be safe then sorry).
    3. Change the wire mode for the 9871 to rs485/wire2-auto with a property node.
    4. remove the large delay between write and read
    5. Last but not least, the one thing that changed the fact that i only received my own echo:
    I changed the connection of the Rx+/Tx+ and Rx-/Tx- around, basically connecting the 2wire sensor the other way around the manufacturer said it should be connected to the master device.
    (6. Recheck the amount of stop bits, all modbus device i use in my lab are using 2 stop bits, but that could be a coincidence)
    Maybe  something of that list helps you
    Attachments:
    Modbustest01.jpg ‏95 KB

  • How can I download my issues with Reader's Digest when each time a pop appears and reads " the item you tried to buy is no longer available"?

    I can no longer download my purchased Reader's Digest magazine since August as it requires updating the RD app. So when i try to download the RD app a pop up appears and reads " the item you tried to buy is no longer available". What does this mean and what do I do? I have 2 pending reader's digest issues that needs to be downloaded.

    I don't have an answer for you but it may help to have a look at the "More Like This" section at the far right of this page. Reading those additional threads may get you some idea of the actual issue and how to resolve it. It could be that problems were found with the app and it was temporarily pulled for some reason which may be the reason for the "the item you tried to buy is no longer available" message.

  • Mac / Adobe Compatibility Issues with Reader X1 & Acrobat X1

    I'm using Acrobat X1  11.0.10 and Reader 11.0.10 with Mac OS X ( 10.8.5).
    In Reader, when I click the "show next page" down arrow, it takes around 5 seconds to jump to the next page. (scrolling to the next page via the scroll bar works fine).
    In Acrobat, when I use the text edit tools, it can take up to 10 seconds before I can edit a word (remove or add a letter).Oftentimes, Acrobat will highlight the whole paragraph rather than just the word I select. (I think this is due to the lag time.) When I backspace to remove a word, nothing happens ... for several seconds. Then letters begin disappearing.
    I reverted from Mavericks and Yosemite back to Lion (or Mountain Lion - I forget what they called 10.8.5) in the hopes of fixing this issue. When I say reverted back. I did a full install. Wiped the hard drive, loaded 10.8.5 and started this Mac as if it were new.
    Is there a version of Reader and Acrobat that work with Mac OS X ( 10.8.5)?

    Hi,
    Acrobat 11 is compatible with MAC 10.8.5. So, there are no compatibility issues.
    Please let me know if this happens with every PDF or some specific one?
    If specific, then please tell me what is the size of your PDF file.
    You might also try repairing Acrobat from the Help menu.
    Regards,
    Anubha

  • Issue with reading a xml file from xsl

    Hi,
    When I am trying to read a xml file from xsl, I am getting unwanted output.
    Following is the XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ns0="http://www.example.org"
                    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:med="http://schemas.oracle.com/mediator/xpath"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                    exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
      <xsl:template match="/">
        <ns0:ReceipentIDType>
        <xsl:for-each select="$ReceipentID">
          <ns0:ReceipentID>
            <xsl:value-of select="$ReceipentID"/>
          </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>
    </xsl:stylesheet>
    Following is the XML ( B2BMarketProperties.xml)
    <?xml version="1.0" encoding="UTF-8" ?>
    <ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
                     xmlns="http://www.example.org">
      <ReceipentID>123</ReceipentID>
      <ReceipentID>345</ReceipentID>
    </ReceipentIDType>
    The output i am getting with this code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    But, I need output in the following format
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123</ns0:ReceipentID>
         <ns0:ReceipentID>345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    Could you guys let me know what i am doing wrong. Any help would be appreciated.
    Thanks,

    This worked for me :
      <xsl:template match="/">
        <ns0:ReceipentIDType>
          <xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
            <xsl:variable name="count" select="position()"/>
            <ns0:ReceipentID>
              <xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
            </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>

  • Issue with reading attachment in sender mail adapter

    Hi, I am working on Email to file scenario, where I have to connect to exchange server and take the attachment of the email (xml file) and save it on to PI server. I have configured sender mail communication channel with following details:
    Protocol: POP3
    Message protocol: XIPAYLOAD
    Mail attributes: keep attachments
    Module:
    1     localejbs/AF_Modules/PayloadSwapBean     Local Enterprise Bean     1
    2     localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean     mail
    1     swap.keyName     Content-Description
    1     swap.keyName     Content-Description
    1     swap.keyValue     attachment,filename="MailAttachment-1.xml"
    1     swap.keyValue     MailAttachment-1
    Also, configured receiver file adapter.
    Since I donu2019t have to read mail content , I havenu2019t created any design components in ESR. I have just refrred to dummy namespace, interface (both sender and receiver). in receiver determination, interface determination, sender agreement and receiver agreements.
    It was working fine, not sure what changes happened. Now I could see the attachment payload in message monitor.
    Under Inbound message->payloads->
    MailMessage ( text/xml;charset=utf-8 )
    MailAttachment-1 ( text/xml;name="****************")
    But the fille that is getting created doesnu2019t have the contents of the attachment (xml file) .  It has some other information, shown below:
    Directory:  ******
    Name:       ********.xml
          =NextPart_002_01CB2C5B.B033B325#
    content-type:text/plain;charset="us-ascii"#
    content-length:30#
    content-transfer-encoding:quoted-printable#
    <<**********.xml>>=20#
          =NextPart_002_01CB2C5B.B033B325#
    content-type:text/html;charset="us-ascii"#
    content-length:#
    content-transfer-encoding:quoted-printable#
          =NextPart_002_01CB2C5B.B033B325  #
    Can you please let me know what is going wrong here.

    using following parameters in module resolved my problem:
    MOdule name                                                                           Type                                                            Module Key
    AF_Modules/PayloadSwapBean                                            Local Enterprise Bean                                      transform sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean                                      mail
    Module Key                                    Parameter Name                              Parameter value
    transform                                        swap.keyName                                Payload-Name
    transform                                        swap.keyName                                 MailAttachment-1

  • Issue with read statement with one more key missing in mapping

    Hi All ,
    I have such data in two internals table :
    IT_bdc
    vbeln            posnr
    90000593     10
    90000576     10
    90000672     10
    90000672     20
    90000672     30
    it_konv
    kbetr          vbeln
    6250          90000576
    12160000          90000593
    500000          90000672
    600000          90000672
    700000          90000672
    My current program statement is :
    LOOP AT it_bdc.
    READ TABLE it_konv WITH KEY
          vbeln = it_bdocs-vbeln.
      currency =   it_konv-waers.
    endloop.
    as you can see the posnr is missing in it_konv how can i modify this read statement so
    that vbeln posnr from it_bdc should get correct kbetr from it_konv.
    Kindly help in this mapping.

    Hi
    sort it_konv by vbeln
    then
    loop at it_bdc.
    read table it_konv with key vbeln = it_bdc-vbeln binary search.
    if sy-subrc = 0.
    perform your logic/task.
    endif.
    endloop.
    also it depends what you want to do after reading it_konv.
    in my logic if there is a vbeln in it_konv which s present in it_bdc then sy-subrc will be 0
    and you can perform your logic.
    and if there will be no matching vbeln in it_konv then sy-subrc will not be 0.
    check the values in debugging.
    Thanks
    Lalit

Maybe you are looking for