Encoding of data

are there any java functions that allows us to encode a string of data into 1 data and allow us to decode it?
please kindly help!
thanks!!!

thanks for all replies!
i've another question...
is there a way to actually shorten my data using programming
which i would storing in my db field and then upon retrieving it out from the field
i "decode" it again to a very long string?
are there such functions to do this??
thanks...

Similar Messages

  • Encoding of data sent to server

    hello, i have problem with encoding of czech chars, all source code is utf-8 encoded, in each page i have <%@ page contentType="text/html; charset=UTF-8"%>, chars shown in page are shown correctly but if i fill some text field and send data to server so the data are not correct, it means in struts action i get not correct data from form bean
    thanks a lot

    There are multiple ways...Temporarily, you can turn on the RFC trace function for the RFC destination in question then view the RFC log file.  You can use a log point in your custom program and switch it on or off as needed and view the log point file which contains each individual table or variable with values.  Or simply, you can write the data to the spool (or an additional spool) based on a trace parameter on the selection screen.

  • Gzip encoded XML data in HTTP adapter

    Hi,
    I'm involved in building an synchronous interface to an external credit agency. According to their documentation their XML response is encoded as a
    gzip XML-data stream. As I understand this it implies that the XML data stream is compressed. Does the XI HTTP adapter (Web-As ICM/ICF framework) support this encoding? 
    Johan Göthberg

    From Adobe Support...
    "When you use an XML-based data provider with a tree you must
    specify the label field, even if it is "label". The XML object
    includes the root, so you must set showRoot="false". Remember that
    the Tree will not, by default, reflect dynamic changes to the XML
    object."
    So all I had to do was change the component tag from this:
    <mx:Tree id="checkTree"
    itemRenderer="util.CheckTreeRenderer" labelField="label"
    width="100%" height="100%" />
    to this:
    <mx:Tree id="checkTree"
    itemRenderer="util.CheckTreeRenderer" showRoot="false"
    labelField="@label" width="100%" height="100%" />
    Just as an FYI... The Adobe support is worth the cost if you
    are fairly new to Flex. I have been flexing for about 9 months now
    and find their service invaluable!!!
    Have an Ordinary Day...
    KomputerMan ~|:-)

  • Set character encoding for data template xml output

    Hello everyone, in my data template, I have defined the header as
    <?xml version="1.0" encoding="WINDOWS-1256"?>
    but when output is generated, it is returned as:
    <?xml version="1.0" encoding="UTF-8"?>
    Is there a way for me to force the WINDOWS-1256 encoding in my data template?
    Many Thanks

    This data is read as
    bytes then I am using the InputStreamReader to convert
    to UTF-8 encoding.Don't you mean "from UTF-8 encoding"? Strings don't have an encoding, bytes can. And do you know that SQL Server produces those bytes encoded in UTF-8, or are you just assuming that?
    The stream is then written to a file with the
    extension ".xml". When I go and open the file, I get
    errors stating that the characters were not
    recognized.When you open the file with what? And what errors do you get?
    However, when I open the file with
    Notepad, I can see my xml data.

  • How to encode the data to HexDec in url and decode back to data from HexDec

    Hi,
    Pls can any one give me solution on this.

    Do you man you need URL decoder? If so then java.net.URLDecoder.

  • Encoding XML Data

    I am trying to create an XML object that looks something like this.
          <LoginInfo xsi:type="type:Creds" xmlns:type="http://login.me.com/types">
             <User xsi:type="xsd:string">bill</User>
             <Password xsi:type="xsd:string">pass</Password>
          </LoginInfo>
    A crucial piece of info is that I need to make sure that the xsi:types appear in the final xml.
    Any suggestions?

    Hi Aslam Riaz,
    Did you find any solution..?
    Kindly help me on this issue.
    Thanks and Regards,
    Shailaja Chityala

  • Open Data Set Encoding

    Hello all,
    Can we specify Encoding in the OPEN DATA SET statement,i found out that we can encode it with UTF-8.
    but i want to encode my data in Latin1 ISO-8859-1.
    is it possible?
    if yes how to do it?
    plz help its urgent:(

    Hello Surmeet
    For me this sounds like that your string contains characters from two different encodings, e.g. ISO-8859-1 and ISO-8859-2.
    You could try to use option
    OPEN DATASET ... IGNORING CONVERSION ERRORS.
    Alternatively, you could surround the OPEN DATASET statement with a
    TRY.
      OPEN DATASET ...
    CATCH CX_SY_CONVERSION_CODEPAGE INTO lo_error.
      ld_msg = lo_error->get_text( ).  " get the message text
    ENDTRY.
    block and analyse the error message text. Hopefully you will find some hints to solve the problem.
    <i>Note</i>: For details refer to the ABAP keyword documentation of OPEN DATASET.
    Regards
      Uwe

  • XSL and url encoded data issue

    I have a large XML document, which has the data in it URLEncoded to escape the nasty chars.
    When I run it through the xalan XSL parser and feed the output to the browser in my servlet, the resultant html has the URLEncoded chars in it. For instance the '/' is still showing up at %2F etc... However, if I can't URLDecode the whole xml document. Is there a simple way for decode the URL chars, without doing too much trickery?
    Thanks!
    Modoc

    You can URL-encode XML data if you like, whatever you mean by "nasty chars" I don't know. The result is perfectly legitimate XML and XSLT will translate it perfectly well. But it won't decode it, that is none of its business. I suppose it would be possible to write an XSLT function to do URL-decoding, but my preference would be to do that some other way. Or not to URL-encode in the first place.

  • Data Set - Encode Attribute Value?

    I'm using an HTML data set with an active region. Some of the
    data is to be used as attribute values (e.g. as the "value" of an
    "input" tag), and some of the data is to be used within the HTML of
    the document (but should not be rendered as HTML). What is the best
    way (recommended practice) for encoding the data for these uses? In
    other words, does the spry framework provide such utilities? Is
    there a way to pull the data out of the data set already encoded
    for use as an attribute value? Or with >, <, and &
    properly encoded for use in HTML?

    I guess you are also using SpryData.js in the same page.
    SpryData.js has a function called
    Spry.Utils.encodeEntities(string);
    It will encode your Entities for you and returns the changed
    string. If you data is already encoded before you brought it in to
    the SpryDataset, make sure you didnt set the columnType to html.
    If not you can do something like this
    <script type="text/javascript">
    function encodeEntities(region, lookupFunc)
    return
    Spry.Utils.encodeEntities(lookupFunc("{dsProducts::desc}"));
    </script>
    <div spry:region="dsProducts">
    <ul spry:repeatchildren="dsProducts">
    <li>{name} - {function::encodeEntities}</li>
    </ul>
    </div>

  • How to Send and Receive Large Amounts of Data to and from a  Web Service

    Hi All,
    My requirement is: .Net Web service should receive a file and services do some modification in that file and return the file. I need to write client (using Java) to invoke that web service. Please help in writing java client code for accessing that service. Suggest if any changes required in Web service code also.
    My .Net web Service web method code:
    [WebMethod]
    public byte [] ByteEcho(byte[] data) {
    -     Some modification code -
    return data;
    }

    that will work fine for small files. it will potentially cause OutOfMemoryErrors on client and/or server for large files. if you want to send/recieve large files, you need to stream them.
    also, be aware that you cannot send raw byte[] via xml, you will need to encode the data using some sort of binary -> text encoding like Base64 encoding.

  • Writing data into file from URL address

    Hi!
    I need to download file from certain url address and write it to file on my local disk. The file being downloaded is a image file and therefore
    I cannot make sure what encoding should I use. When I save file manually on disk and compare it with the file written programmatically, then
    the bytes in both files are not equal. Any smart advises are welcome.
    The code being used is:
    import java.net.*;
    import java.io.*;
    public class UrlParser {
         public static void main(String[] args) {
              String data;
              try{
                   // Construct a URL object
                   URL url = new URL("http://stockcharts.com/c-sc/sc?s=qqqq&p=D&b=3&g=0&i=t74934638175&r=4028");
                   // Open a connection to the URL object
                   String encoding = "UTF8";
                   BufferedReader html = new BufferedReader(new InputStreamReader(url.openStream(),encoding));      
                   Writer img_out = new OutputStreamWriter(new FileOutputStream("sc.gif"), encoding);
                   while((data = html.readLine()) != null) {
                        img_out.write( data );
                   img_out.close();
              } catch(MalformedURLException e) {
                   System.out.println(e);
              } catch(IOException e) {
                   System.out.println(e);
    }

    Use InputStream and OutputStream classes, not Readers/Writers. The latter are for "text" I/O, not "binary".

  • Use a preset, but encoded .mov file is different bit rate... why?

    Hi,
    I have a few 2mins sequences from FCP5.1.4 exported to compressor and choose the preset web download .H264 800Kbps.
    In the Inspector it shows the file info as:-
    File Extension: mov
    Estimated file size: 7.42 MB
    Audio Encoder
    AAC, Stereo (L R), 48.000 kHz
    Video Encoder
    Format: QT
    Width: 480
    Height: 270
    Pixel aspect ratio: default
    Crop: None
    Frame rate: 23.976
    Frame Controls: Off
    Codec Type: H.264
    Multi-pass: On, frame reorder: On
    Pixel depth: 24
    Spatial quality: 50
    Min. Spatial quality: 50
    Key frame interval: 150
    Temporal quality: 50
    Min. temporal quality: 50
    Average data rate: 0.688 (Mbps)
    Fast Start: on
    but when it finishes encoding, the data rate is far less than what it was suppose to be?
    now the fun starts... this hasn't happened to every sequence, some are perfect.
    I can shorten this particular sequence in FCP to say 10seconds and quickly try the preset in compressor and everything is good, I then go back into FCP and undo the shortening to give me back my full length clip and export to compressor using the exact same preset and I'll not get the data rate I want... it shows no error either.... it looks like everything worked as the preset says but checking the info it hasn't.
    Sorry for the long winded explaination but it's driving me crazy, been sat here over 4 hours, keep redoing everything but no luck.
    Any help?
    Could it be a bug in compressor I'm not aware of?
    C.

    sorry, the above post has some text missing when I copied and pasted...
    it should read as follows:-
    *I choose a preset and the inspector reads:*
    File Extension: mov
    Estimated file size: *7.42 MB*
    Audio Encoder
    AAC, Stereo (L R), 48.000 kHz
    Video Encoder
    Format: QT
    Width: 480
    Height: 270
    Pixel aspect ratio: default
    Crop: None
    Frame rate: 23.976
    Frame Controls: Off
    Codec Type: H.264
    Multi-pass: On, frame reorder: On
    Pixel depth: 24
    Spatial quality: 50
    Min. Spatial quality: 50
    Key frame interval: 150
    Temporal quality: 50
    Min. temporal quality: 50
    Average data rate: 0.688 (Mbps)
    Fast Start: on
    *But the file that is created reads as follows:-*
    Data Size: *2.13 MB*
    Data Rate: *198.31 kbits/sec*
    Duration: 00:01:30:54
    Normal Size: 480 x 270 pixels
    Anyone know why it's coming out different?
    Thanks
    C.
    Message was edited by: Morgantime

  • Cannot encode double & single quote " and ' using htmldb_util.url_encode()

    Hello,
    I'm using HTMLDB 1.5.0.00.33 on Oracle 9.2.0.6 database. The data(a sql query that populates the report page) that I want to pass as part of URL string contains special characters like #, $, % and quotes " or '. I'm using htmldb_util.url_encode() to encode the data and it works fine for special characters except for " & '. Can someone please help in this? Below sql query shows that.
    SQL>select htmldb_util.url_encode('A%"#') from dual;
    HTMLDB_UTIL.URL_ENCODE('A%"#')
    A%25"%23
    1 row selected.
    Thanks
    Shashin

    Shashin,
    You could try using the UTL_URL.Escape function with the escape_reserved_chars parameter set to TRUE. That should encode the reserved characters.
    See the documentation here: http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_url.htm#sthref15935
    If you want to call it from a SQL statement, you'll need to wrap it in a function like this:
    function MyURLEscape(URL varchar2) return varchar2 is
       Result varchar2(4000);
    begin
       Result := UTL_URL.Escape(URL, TRUE);
       return(Result);
    end MyURLEscape;

  • How do I deal with approximate dates for pictures in Aperture?

    I am scanning old slides for Aperture. The slides are numbered, film number and frame number within film, so the sequence is determined, but many do not have an exact date. They may have the month, or a range of possible dates derived from the closest previous and next dated slide. Aperture seems to require an exact date and I cannot find a way round this problem from Help. This must be a relatively frequent problem, so can anyone please suggest a solution?

    The date+time stamp is exact.
    You have at least two options.
    Assign a "close-enough" date+time, and encode it so that you know at a glance that it is assigned.  My suggestions is to specify as much as you can, and use ones for all unknown specifics.  So if you know the year and the month, but no more, the date+time is YYYY MM 11 11:11:11.
    There are two problems with this approach.  First, there is no way to know whether the first "1's" encountered are specific, or are placeholders indicating "unknown".  The second possible problem with the approach is that it may not present information you may want, which is the range of possible date+times.  For that to work, you must use different metadata to encode the date and time information.  If that information is important, I suggest setting up a series of keywords, or use text in a custom metadata field.
    You could, of course, combine the two approaches: assign the date+time as best you can, and then include a note in a custom metadata field that describes what you know of the actual date+time of the Image.
    Note that Aperture allows you to change the _relative_ date, and does not allow (afaik) you to assign a _specific_ date.  For your work, you might find it best to use ExifTool to change the date+time in each file prior to importing into Aperture.

  • Media Encoder Will Not Launch - MSVCR110.dll

    Since I'm not getting any help in the Premiere Forum, I'm re-posting this here....
    After installing updates to both MS and Adobe CC this morning, I cannot get the Media encoder to launch. However After Effects launches just fine. Premiere crashes during the splash screen but the error is different.
    Media encoder doesn't even make it to the splash screen.
    Media Encoder Error:
    Log Name:      Application
    Source:        Application Error
    Date:          1/14/2015 7:42:17 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      JANUS
    Description:
    Faulting application name: Adobe Media Encoder.exe, version: 8.2.0.54, time stamp: 0x5486ba54
    Faulting module name: MSVCR110.dll, version: 11.0.51106.1, time stamp: 0x5098826e
    Exception code: 0x40000015
    Fault offset: 0x00000000000740da
    Faulting process id: 0xb14
    Faulting application start time: 0x01d030084ab27640
    Faulting application path: C:\Program Files\Adobe\Adobe Media Encoder CC 2014\Adobe Media Encoder.exe
    Faulting module path: C:\Windows\system32\MSVCR110.dll
    Report Id: 88aeb893-9bfb-11e4-bd8d-000272d5be15
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-01-14T14:42:17.000000000Z" />
        <EventRecordID>15101</EventRecordID>
        <Channel>Application</Channel>
        <Computer>JANUS</Computer>
        <Security />
      </System>
      <EventData>
        <Data>Adobe Media Encoder.exe</Data>
        <Data>8.2.0.54</Data>
        <Data>5486ba54</Data>
        <Data>MSVCR110.dll</Data>
        <Data>11.0.51106.1</Data>
        <Data>5098826e</Data>
        <Data>40000015</Data>
        <Data>00000000000740da</Data>
        <Data>b14</Data>
        <Data>01d030084ab27640</Data>
        <Data>C:\Program Files\Adobe\Adobe Media Encoder CC 2014\Adobe Media Encoder.exe</Data>
        <Data>C:\Windows\system32\MSVCR110.dll</Data>
        <Data>88aeb893-9bfb-11e4-bd8d-000272d5be15</Data>
      </EventData>
    </Event>
    Premiere Error:
    Log Name:      Application
    Source:        Application Error
    Date:          1/14/2015 7:25:14 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      JANUS
    Description:
    Faulting application name: Adobe Premiere Pro.exe, version: 8.2.0.65, time stamp: 0x5486db4a
    Faulting module name: dvaui.dll, version: 8.2.0.65, time stamp: 0x5486b61b
    Exception code: 0xc0000005
    Fault offset: 0x00000000001871a8
    Faulting process id: 0x2850
    Faulting application start time: 0x01d03005e5267507
    Faulting application path: C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\Adobe Premiere Pro.exe
    Faulting module path: C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\dvaui.dll
    Report Id: 26edb042-9bf9-11e4-bd8d-000272d5be15
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-01-14T14:25:14.000000000Z" />
        <EventRecordID>15073</EventRecordID>
        <Channel>Application</Channel>
        <Computer>JANUS</Computer>
        <Security />
      </System>
      <EventData>
        <Data>Adobe Premiere Pro.exe</Data>
        <Data>8.2.0.65</Data>
        <Data>5486db4a</Data>
        <Data>dvaui.dll</Data>
        <Data>8.2.0.65</Data>
        <Data>5486b61b</Data>
        <Data>c0000005</Data>
        <Data>00000000001871a8</Data>
        <Data>2850</Data>
        <Data>01d03005e5267507</Data>
        <Data>C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\Adobe Premiere Pro.exe</Data>
        <Data>C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\dvaui.dll</Data>
        <Data>26edb042-9bf9-11e4-bd8d-000272d5be15</Data>
      </EventData>
    </Event>
    System Information:
    NVIDIA System Information report created on: 01/14/2015 07:43:58
    System name: JANUS
    [Display]
    Operating System: Windows 7 Enterprise, 64-bit (Service Pack 1)
    DirectX version: 11.0
    GPU processor: GeForce GTX 750 Ti
    Driver version: 347.09
    Direct3D API version: 11
    Direct3D feature level: 11_0
    CUDA Cores: 640
    Core clock: 1176 MHz
    Memory data rate: 5400 MHz
    Memory interface: 128-bit
    Memory bandwidth: 86.40 GB/s
    Total available graphics memory: 4096 MB
    Dedicated video memory: 2048 MB GDDR5
    System video memory: 0 MB
    Shared system memory: 2048 MB
    Video BIOS version: 82.07.32.00.50
    IRQ: 24
    Bus: PCI Express x16 Gen2
    Device Id: 10DE 1380 37593842
    Part Number: 2010 0050
    [Components]
    NvGFTrayPluginr.dll 16.18.9.0 NVIDIA GeForce Experience
    NvGFTrayPlugin.dll 16.18.9.0 NVIDIA GeForce Experience
    nvui.dll 8.17.13.4709 NVIDIA User Experience Driver Component
    nvxdsync.exe 8.17.13.4709 NVIDIA User Experience Driver Component
    nvxdplcy.dll 8.17.13.4709 NVIDIA User Experience Driver Component
    nvxdbat.dll 8.17.13.4709 NVIDIA User Experience Driver Component
    nvxdapix.dll 8.17.13.4709 NVIDIA User Experience Driver Component
    NVCPL.DLL 8.17.13.4709 NVIDIA User Experience Driver Component
    nvCplUIR.dll 8.1.740.0 NVIDIA Control Panel
    nvCplUI.exe 8.1.740.0 NVIDIA Control Panel
    nvWSSR.dll 6.14.13.4709 NVIDIA Workstation Server
    nvWSS.dll 6.14.13.4709 NVIDIA Workstation Server
    nvViTvSR.dll 6.14.13.4709 NVIDIA Video Server
    nvViTvS.dll 6.14.13.4709 NVIDIA Video Server
    NVSTVIEW.EXE 7.17.13.4709 NVIDIA 3D Vision Photo Viewer
    NVSTTEST.EXE 7.17.13.4709 NVIDIA 3D Vision Test Application
    NVSTRES.DLL 7.17.13.4709 NVIDIA 3D Vision Module
    nvDispSR.dll 6.14.13.4709 NVIDIA Display Server
    NVMCTRAY.DLL 8.17.13.4709 NVIDIA Media Center Library
    nvDispS.dll 6.14.13.4709 NVIDIA Display Server
    PhysX 09.14.0702 NVIDIA PhysX
    NVCUDA.DLL 8.17.13.4709 NVIDIA CUDA 7.0.18 driver
    nvGameSR.dll 6.14.13.4709 NVIDIA 3D Settings Server
    nvGameS.dll 6.14.13.4709 NVIDIA 3D Settings Server

    Hi ELFrederick,
    ELFrederick wrote:
    Nevermind, I got it working last night by uninstalling the programs that Patch Tuesday broke. Premiere, Media Encoder, and I found out that Prelude wasn't working either.
    All working now after an uninstall, reboot, and reinstall. The patches also reset my creative cloud folder from it's custom location to default.location, and I have to move it back to the other location. My SSD is smallish and I didn't want the data files there, just the OS and the program files.
    Good to know. Thanks for reporting back!
    Kevin

Maybe you are looking for