Converting bytearray into binary format

Hi I have a byteaary , I want to convert this byteArray data into binary format (01010101) , Please help me
[Bindable]
            private var imgByte:ByteArray;
bitmapData     = new BitmapData(pic.width, pic.height);
                 bitmapData.draw(pic,new Matrix());
                var jpg:JPEGEncoder = new JPEGEncoder();
                imgByte = jpg.encode(bitmapData) ;
var i:int=imgByte.readByte()
Alert.show(i.toString(2));
thanks in advance

Didn't toString(2) work?

Similar Messages

  • I am wondering what upgrades I need in order to convert PDFs into another format and compress the size of a PDF (if this is possible)?

    I want to be able to convert PDFs into another format and I know this can be achieved with a small upgrade. However I am also looking for the ability to compress the size of PDFs, if this is at all possible.

    You can use Acrobat Standard for this.

  • How to convert image to binary format

    Hi all,
      We have developed an Employee search  mobile web application in .net which is hosted on an exposed IP server, we need to show the employee data along with the image of the employee on mobile.
    When we run this application through our desktop we are able to see the image of the employee since we are doing this through <b>intranet</b> , but when we try to access the same from any mobile device we are able to see only the data but no image, since we are doing this through <b>internet(exposed server).</b>
    Please suggest some way to get this image,
    is there any<b> function module in ABAP</b> which can <b>convert image to binary format</b>
    so that we <b>export binary data</b> to .net application

    Hei evryone!
    CAn anyone pls help me on how to solve this error:
    java.security.AccessControlException: access denied (java.security.SecurityPermission insertProvider.SunJCE)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkSecurityAccess(Unknown Source)
         at sun.plugin.security.ActivatorSecurityManager.checkSecurityAccess(Unknown Source)
         at java.security.Security.check(Unknown Source)
         at java.security.Security.insertProviderAt(Unknown Source)
         at java.security.Security.addProvider(Unknown Source)
         at CryptoTest.processFile(SwingApplet.java:68)
         at CryptoTest.<init>(SwingApplet.java:65)
         at SwingApplet.init(SwingApplet.java:39)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Is it allright for a swing code to access local resources? like in my case i want my swing app to decrypt and encrypt an image file but when i tried to access the method for decrypting and encrypting i got this error message on my console. Do i have to make my code signed before i could write/read a file on my hard drive?
    Any help / suggestions would be much appreciated.Thanks!

  • How to convert Milliseconds into Date format

    Hi all,
    I am getting the output of a variable in milliseconds format, how can I convert it into date format
    For ex: I am getting input variable as 1366664691000 and I need to convert it to April 22, 2013 5:04:51 PM EDT ( or of SOA format). is there any function for this in XSL or XPath?
    Thanks,

    It is working fine if i test it in provided site...
    But it is returning "-1366664691001", If i am running it in EM. This is the code in my xsl
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="process" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="processResponse" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE MAY 07 10:21:02 EDT 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: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:bpmn="http://schemas.oracle.com/bpm/xpath"
    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"
    xmlns:client="client"
    exclude-result-prefixes="xsi xsl bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">
    <xsl:template match="/">
    <xsl:variable name="lastMTime" select="1366664691000"/>
    <xsl:copy-of select="$lastMTime"/>
    <client:processResponse>
    <client:result>
    <xsl:value-of select='xsd:dateTime("1970-01-01T00:00:00") + $lastMTime * xsd:dayTimeDuration("PT0.001S")'/>
    </client:result>
    </client:processResponse>
    </xsl:template>
    </xsl:stylesheet>

  • Problem with Euro sign when converting it into PDF Format

    Hi all,
    i am facing problem with Euro (u20AC) sign,
    it is displayina s #
    when converting one smartform into PDF format.
    Can any body sugest me in doing this??
    it is appriciable if any body can help m??
    thanks in advance
    Regards,
    Srikanth.

    Hi Srikanth,
    I think I'm facing the same issue as you. I looked at the note 323736 but my system seems to be up to date (at least for this issue). I have SAP_BASIS release 700.
    Did you upgrade your system ? Did you do something else ?
    Thanks for your help.
    Best regards,
    Pierre

  • Converting files into pdf format in java

    Hi all,
    How can we convert a file into PDF format in java?My application does the
    file upload, and I need the files to be converted into PDF format.
    The uploaded file can be of any type. How can I do this?
    Please give me some help.
    Thanks and regards,
    Sandeep.

    >
    How can we convert a file into PDF format in java?My application does the
    file upload, and I need the files to be converted into PDF format.
    The uploaded file can be of any type. ...>1) Write a class that will intelligently render a file of any type..
    2) ... (well, do '1' first, then after getting your Nobel prize for AI, come back and we'll talk)
    >
    Please give me some help.>Please review your requirement.
    BTW
    - PDF sucks. It is designed for printing, and I (for one) don't want to kill more trees, and have no printer.
    - This subject (convert file to PDF) has been discussed on the forums a bazillion times. Did you search the forums before asking your two (very closely related) questions?

  • Convert PO into PDF format and send by an email to vendor

    We are using SAP version ECC 5.0. We want to convert SAP PO into PDF format and attached it in an email and send it to vendor. Please give me some tips to achieve this?
    Thanks in advance!
    Mrudula

    Hi!
    The way to achieve your goal depends on how you get PO printed - by sapscript, smartform or abap list.
    As have been mentioned you can create spool request and process it. But for sapscript and smartform you can proceed without spool request - just get back OTF data from corresponding FM and convert it to PDF.
    In case of smartform:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZFORMNAME'
    IMPORTING
    fm_name = v_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    i_otf[] = w_return-otfdata[].
    In case of sapscript:
    options-tdgetotf = 'X'.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    options = options
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT =
    RDI_RESULT =
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    OTHERS = 5.
    Then convert to PDF
    DATA:
    pdf LIKE tline OCCURS 100 WITH HEADER LINE,
    v_len_in LIKE sood-objlen.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       format                      = 'PDF'
       max_linewidth               = 132
      ARCHIVE_INDEX               = ' '
    IMPORTING
       bin_filesize                =  v_len_in
        TABLES
          otf                         = i_otf
          lines                       = pdf
       EXCEPTIONS
         err_max_linewidth           = 1
         err_format                  = 2
         err_conv_not_possible       = 3
         OTHERS                      = 4
    Then send as attachment as Max proposed.
    Regards,
    Maxim.

  • Convert data into Date Format imported from MS SQL Server.

    I have imported Data from MS SQL Server. The "Date Column" received in number format like 41017.6361109954. How can i convert it into Date in Oracle SQL.
    If i import same Data in Excel and change the Column Type to Date. It changes successfully. But in Oracle, I tried To_Date function with different parameters but it didn't work.
    Edited by: XAVER on Apr 22, 2012 2:31 AM

    XAVER wrote:
    The actual date for 41017.6361109954 is 22-Apr-2012 but its showing 20-APR-2082It looks like offset is January 1, 2000:
    select timestamp '2000-01-01 00:00:00' + numtodsinterval(41017.6361109954,'day') from dual;
    20-APR-12 03.15.59.990002560 PM
    SQL> SY.

  • Is BPEL supports writing character data into binary format  ?

    Hello,
    I can write a BLOB data from DB to a file using Opaque feature in File Adapter.
    But is it possible to write Character data into Binary or Hex Format either by using base64Binary or Hex or bytes formats supported in XML?
    Thanks

    I am looking WHOLE FORMA DATA in either XSTRING or BINARY FORMAT or any other format, except STRING format.
    I gave COUNTRY as an example, but am looking the HWOLE form AS IS
    Any help pls.
    Thank you   

  • Extract FORM data into BINARY format or XSTRING format?

    Hello,
    Our config: I am developing an VISITOR Adobe Interactive Form, i have Designer 8.1 and Reader 9.0 in my Windows 7 Laptop. When i checked the menu EDIT-->form properties --> Compatability, its Adobe XML form File (XDP)
    When i opened this VISITOR interactive form in a browser, right clicking and checked form PROPERTIES, then i saw the "PDF Version: 1.6 (Acrobat 7.x)"
    I am using JavaScript
    1st user opened the form, entered data, say entered USA in COUNTRY field.
    2nd user opened the same form and edited the COUNTRY field from USA to UK.
    Pls. let me know is there any way for me to capture the user entered data into a BINARY format or XSTRING or RAW FORMAT or RAW STRIGN
    Pls. note i need latest changes, like COUNTRY field hold the value of UK.
    Pls. note for some reason, SAVE the form should not come into picture in my case (form will be saved in some workflow (pls. note not adobe's workflow, we hv SAP workflow) staging area in the time lapse of between  1st user and 2nd user,)
    Thank you

    I am looking WHOLE FORMA DATA in either XSTRING or BINARY FORMAT or any other format, except STRING format.
    I gave COUNTRY as an example, but am looking the HWOLE form AS IS
    Any help pls.
    Thank you   

  • Convert pdf into excel format - format issue

    Before I purchase an Adobe Acrobat Pro XI I have downloaded the trail version for evaluating. I have also run an Update of the program.
    Our company is receiving a lot of order files in PDF-format and instead of entering the order lines manually into our order system we want to convert these pdf files into Excel format. We can then use this xls file to upload the order into SAP and in that way save a lot of time. The pdf file consists of several columns as material number, description, quantity …..I want that every column in the pdf document also appears in one own column in the xls file. This works for several order lines but then suddenly are all the columns for some order line written into one and the same column and then are the columns again correctly written. I have tried with several pdf files with the same problem. Has anyone any idea what the reason for this issue is?

    Is this a PDF form? If so, you should be able to extract the data in the form using the manage data under the forms tools. That may be what you are looking for.
    Whenever I see a post related to forms by a commercial concern, there is an issue related to Reader rights. Some of this has changed with AA XI and it would be good to review the license agreement carefully to be sure you are in compliance (law suits are not pretty).

  • Convert Milliseconds into specified format

    HI,
    How to convert System.currentMillis() into yyyy-mm-dd HH:MM:SS:SSS format?
    PLease give me a solution
    Thanks

    Use
    long currTime = System.currentTimeMillis();
    Calendar cal = Calendar.getInstance();
    cal.setTimeInMillis(currTime);
    System.err.println(cal);
    LOL, have you run this codez? For me, it outputs:
    java.util.GregorianCalendar[time=1176827393171,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2007,MONTH=3,WEEK_OF_YEAR=16,WEEK_OF_MONTH=3,DAY_OF_MONTH=17,DAY_OF_YEAR=107,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=29,SECOND=53,MILLISECOND=171,ZONE_OFFSET=-28800000,DST_OFFSET=3600000]

  • Converting Javabeans into XML format

    HI,
    I have wrote program that will read input from users then stored them in javabeans. I used the serialize function to create xml file from the javabeans.
    public static void CreateXML(LocationRequest location)
              try
         // Serialize object into XML
         XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
    new FileOutputStream("test.xml")));
         encoder.writeObject(location);
         encoder.close();
         } catch (FileNotFoundException e) {
    The output file is as follows :
    <?xml version="1.0" encoding="UTF-8"?>
    <java version="1.4.1_05" class="java.beans.XMLDecoder">
    <object >
    <void property="address">
    <string>21212122</string>
    </void>
    <void property="originatorId">
    <string>Anu</string>
    </void>
    </object>
    </java>
    Could anyone has idea on how i can change the above xml file into another new xml format like below:-
    <address> 21212122</address>
    <originatorId> "Anu "</originatorId>
    Cheers,
    Bambli

    The quickest way would be to use XSLT. Write a stylesheet that converts your 1st format to your 2nd format.
    Here's an example stylesheet. (I'm a little rusty on my XSL so you'll want to test this.)
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" encoding="UTF-8"/>
      <!-- simply copy the message to the result tree -->
      <xsl:template match="/java/object/void/@property">
        <xsl:element name="local-name()">
          <xsl:value-of select="text()"/>
        </xsl:element>
      </xsl:template>
    </xsl:stylesheet> Feed this to a transformer as follows:
    javax.xml.transform.TranformFacotry factory = javax.xml.transform.TransformerFactory.newInstance();
    javax.xml.transform.stream.StreamSource source = new javax.xml.transform.stream.StreamSource(new java.io.File("yourstylesheet.xsl"));
    javax.xml.transform.Transformer xformer =factory.newTransformer(source);
    xformer.transform(new javax.xml.transform.stream.StreamSource(new java.io.File("yourbean.xml")),new javax.xml.transform.stream.StreamResult(new java.io.File("yourconverted.xml")));Its that simple.
    Cliff

  • Pb converting plist to binary format

    Hi,
    I have an XML plist generated by a perl program that I would like to convert to binary plist in a shell script. So I'm using the dedicated "plutil" program from the command line.
    Alas it won't convert the plist to binary, leaving it in XML format wether I try :
    plutil - convert binary1 fuel.plistorplutil -convert binary1 -o fuel2.plist fuel.plist
    So I try this :plutil -convert binary1 -o - fuel.plistto send the result to the STDOUT.
    Bingo, the output is definitely a binary plist as it starts with the "bplist" signature and is followed by lots of non human-readable characters.
    But ... when I tried this :plutil -convert binary1 -o - fuel.plist > fuel2.plistIstill get that XML file !!
    I tried with different filenames like fuel.db for the output in case plutil would reserve the .plist extension to XML format. I also validated the input file with plutil.
    This is driving me crazy ... There must be something, but what ?
    Any help appreciated
    Regards
    Phil

    Rather than 'cat' I would definitely suggest 'hexdump' as 'cat'ing a binay file to a terminal might lead to somewhat weird results. Try one of these:
    %> hexdump -C fuel2.plist
    %> hexdump -C fuel2.plist | less
    %> hexdump -C fuel2.plist | head
    Another possibility would be to test the type of the file using the 'file' utility:
    %> file fuel.plist
    fuel.plist: XML document text
    %> file fuel2.plist
    fuel2.plist: Apple binary property list
    I think that's rather clear
    HTH

  • Converting 0FISCPER into 0FISCYEAR format

    Hi all,
    I have a requirement to convert value of type 0FISCPER into a 0FISCYEAR format.  This needs to be done as a FOX formula in my parameter group.  Can anyone give suggestion please?  I'm new to BPS.
    Thanks,
    Aloy

    Hi,
    Thank you very much for your reply.  I have tried your suggestion but some sort of data type mismatch error came out.  The result of SUBSTR is of type string but the 0FISCYEAR however is non-string.  As I'll just be using the fiscal year value on my IF condition, I managed to make do by defining a fiscal year variable of type string and use this to assign the result of substr.  Now it works.
    Thanks again.
    Aloy

Maybe you are looking for

  • How do I use a previous email address with my printer?

    How do I use a previous email address with my printer?  I reset my printer and want to use the same email address as before.Thanks

  • Dropdown list default value  in Visual Composer

    Hi all  , i have dropdown list in my Visual composer layout  i have values coming like 2001 to 2014 ,everything is fine . i need to display default value in the dropdown list should be curent year like 2009when i deploy the application by default the

  • Retrieving/inserting timestamp

    I have a VB dll that calls a stored procedure and retrieves a timestamp column (Oracle 9i, VB6, OraOLEDB Provider). I am getting the following error:ORA-06502: PL/SQL: numeric or value error: character string buffer too small I am using the adDBTimeS

  • Name of a chat to start chatting

    Hi! I'm new to all of this - i've only had my Apple for a little while. I used to be an experienced PC user - went off them and fell in love with my shiny white little Apple. Currently I'm trying to figure out how to use iChat. I have accounts with m

  • JSC app in creator..geting SQLException

    I had created a JSF simple web application using JSC. It has a table which is loaded through a CachedRowSet. This application works perfectly when I deploy it in the bundled Sun app server. I used the steps mentioned in http://www.jboss.org/wiki/Wiki