Read Mp3 from buffer with http connection in realtime?

Hello friends, i am new in this place and my grammar and english languaje is bad.
I wanna read mp3 from http in realtime (j2me) , without waiting for download complete file and using buffer realtime, please i need your help.
i found in the network forum a code that maybe but I failed to make it work.
mi mail is [email protected]
very grateful to you.
Edited by: chocote on May 2, 2009 12:26 AM

Hi Andrey,
even with access to the delta buffer it would be hard (I think impossible) to implement a new lines check.
1. You would need the data the query has read, possibly by reading again the data the query has read (vial plan buffer access). This is in general not possible since the query has much more filtering featues compared to the plan buffer (e.g. restricted key figures).
2. You would need a delta buffer access (but this is not exposed via an 'external API'), but this is not enough since the delta buffer does not care whether a record is new or old. One does not know this in the delta buffer.
To implement a real new line check (only 'real' new lines are allowed) one needs the old result set; this is not even known to the OLAP since e.g. for drill-down only the needed data will be read, not the full grid the end user sees in the front end. In the 7.0 code line this information is simply not there.
With the new infrastructure shipped in 7.01, SP05 (cf. note 1358614) a kind of new lines check in the above sense would be relatively easy (for SAP) to implement. But one question is, what is a new line, think of zero suppression, conditions ? Should the system take records into account filtered out by the above featues ? Should a new line check by a query property ?
Regards,
Gregor

Similar Messages

  • Can't transfer mp3 from overdrive with itunes 12.1 Was told aware of problem. When is it going to be fixed

    Can't transfer mp3 from overdrive with new itunes 12.1 update. Was told aware of problem. When is it going to be fixed? This is very frustrating. There are a lot of glitches now with trying to transfer audiobooks even the WMA. 12.1 deleted my entire music library.

    We don't work for Apple. If you want to know when something is going to be fixed you'll need to ask them.

  • Unable to download a purchased MP3 from Napster with Firefox 3.6.13 but it worked with IE 8.0, presumably due to a security setting.

    I purchased my first MP3 from Napster but I couldn't get the song to download successfully. I think I narrowed the problem down to Firefox (V3.6.13) not allowing the download to complete. After several attempts and failures, as a test, I tried the same download sequence with IE 8.0 and got the download to complete. I couldn't find a setting in the Firefox TOOLS -> OPTIONS menu to modify the security to allow this download to happen. Am I missing a setting option somewhere?

    Hi,
    I checked everywhere including HAT Mail Policies (i.e. Relay, Accept, throtles) which I set to limit of 20MB from 10MB. I have created a Imcoming mail policy for particular user and disable antispam, Antivirus, content filtering and virus outbreak for troubleshooting.
    below is a output of same through EHELO to server which show maximum size accepted by Email server i.e. Ironport ESA is 2097520 i.e. 20MB.
    250 SIZE 20971520
    Resolving hostname...
    Connecting...
    SMTP -> FROM SERVER:
    220 mail1.abc.ae ESMTP
    SMTP -> FROM SERVER:
    250-mail1.abc.ae
    250-8BITMIME
    250 SIZE 20971520
    MAIL FROM: [email protected]
    SMTP -> FROM SERVER:
    250 sender ok
    RCPT TO: [email protected]
    SMTP -> FROM SERVER:
    250 recipient ok
    Sending Mail Message Body...
    SMTP -> FROM SERVER:
    354 go ahead
    SMTP -> FROM SERVER:
    250 ok: Message 3262478 accepted
    Message completed successfully.

  • Errors with HTTPS Connection to external server

    I am trying to establish a HTTPS connection to an external web site in transaction SM59,  but I get “ICM_HTTP_CONNECTION_FAILED” errors.  I get the same errors from a bespoke ABAP program.
    I know the request is getting to the web site, but the response is not getting back into SAP. 
    This is not firewall related.
    I have installed and configured the SAPCRYPTOLIB software for SSL support and entered the necessary instance profile parameters.
    I have configured STRUST.
    SM59 is setup for type G (HTTP Connection to Ext. Server) and port no. 8443
    I have started the HTTPS service in SMICM
    I have noticed an odd entry in the SCICM trace file,  but don’t know how to fix.
    <i>ERROR => Connection request from (-1/65535/0) to host: mms-sap.sapmms.com, service: 8000 failed (NIECONN_PENDING)</i>
    Does anyone have any suggestions?

    Thanks for your comments.
    I've tried everything in SM59. 
    SAP refers to both protocols as HTTP. 
    I think the error is with the response coming back into SAP.  SAP doesn't know what to do.  It might be DNS related or I might need to configure the ICM somewhere.  Oddly the response comes back into sap on port 8000 (which is HTTP).  It went out on port 8443 (which is HTTPS).

  • Channel login error with HTTPS connection

    Hi!
    I have developed a Flex application which relies on remote object invocations to BlazeDS. I have applied custom authentication to the AMF channel, so login is required to invoke remote objects over the channel.
    Application worked perfectly in development environment but at production environment I cannot get channel sucessfully logged in. I have debugged application and no response is obtained from server after channel.login() invocation. Backend resides on Apache Tomcat that listens on port 80. Server is fronted by a Proxy Server that sets HTTPS protocol (https://domain:80/context is set at browser URL although I request http://domain:80/context).
    At development environment requests where made with HTTP protocol so I wonder if this issue is related with the HTTPS protocol present in the new server.
    Do I need to configure my channels to use secure (HTTPS) communications? Why am I not getting any error response from channel login operation?
    I reviewed server logs and It seems login AMF invocation are been tracked but I cannot get any response.
    Thank you in advance.

    Thank you Alex.
    I've set this configuration in services-config.xml. First I tried using SecureAMFEndpoint but then I got an exception on Server that said a secure destination was needed (as it was secured) but was not receiving a secured request. I saw a post in a forum that said AMFEndpoint must be used instead of SecureAMFEndpoint when SSL is applied to a proxy that redirects request to Tomcat, not to Tomcat itself, and this is my case.
    <services-config>
        <services>
            <service-include file-path="proxy-config.xml" />
            <default-channels>
               <channel ref="amf-channel"/>
            </default-channels>
        </services>
        <channels>
            <channel-definition id="amf-channel" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint
                    uri="https://{server.name}:{server.port}/{context.root}/messagebroker/amf"
                    class="flex.messaging.endpoints.AMFEndpoint" />
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
    </services-config>
    After setting this, channel is succesfully logged in and a remote invocation that is executed inmediatly after channel loggin is completed works OK. But when later I call another remote objects, I get request timeout errors and server is not reached.
    Any idea of the issue?

  • Reading data from another clients network connection

    I would like anyone who know to direct me to some resources for how one could write code that can read data from a port without "binding" to it. In other words, I have an application running on windows talking to a server. I want to monitor that conversation with a separate java application. This is a simple sort of a firewall.
    Is there a java api available, or a part of a package that can do this? So far, I have only seen information on binding to a port, which prevents the client from running at the same time as my java application.
    Thanks very much in advance.

    The simplest way to implement this is to create a proxy. The client connects to your proxy and your proxy connects and forward all data. Montioring this is then trivial.
    You could snoop the network, but I don't know and easy way to this in Java. Perhaps google has something.

  • Configure ADF with HTTPS connections

    Hello.
    I am trying to deploy an ADF application with the protocol https.
    When I write the url:
    https://[my_domain]/[my_application]
    The request is done, but the adf controller answers suddenly with the url i sent, but it writes instead of https http, and adds in the end of the url a lot of get parameters like the next sample:
    http://[my_domain]/[my_application]/faces/[my_wellcomefile]?_afrLoop=2328230397945919&Adf-Window-Id=w0&_afrWindowMode=0&_adf.ctrl-state=14g97quz_327&_afrRedirect=2328230626510965
    I don`t mind the get parameters, I suppose that they are needed for adf to work. But the problem is that I need the request to connect with https, not with http, because my apache has only opened the port 8080.
    Please, anyone can tell me how to configure adf to disable this redirection, or to configure the redirection to point to:
    If the request comes from http -> redirect to http
    if the request comes from https -> redirect to https.
    Regards

    Thanks Chris,
    But I don`t think the problem is related with WebLogic Server. The weblogic is already with a ssl connection configured and working. In fact, after the redirection to the second url:
    http://[my_domain]/[my_application]/faces/[my_wellcomefile]?_afrLoop=2328230397945919&Adf-Window-Id=w0&_afrWindowMode=0&_adf.ctrl-state=14g97quz_327&_afrRedirect=2328230626510965
    if copy and paste this url but changing the protocol https:
    https://[my_domain]/[my_application]/faces/[my_wellcomefile]?_afrLoop=2328230397945919&Adf-Window-Id=w0&_afrWindowMode=0&_adf.ctrl-state=14g97quz_327&_afrRedirect=2328230626510965
    it works! So, summarizing, the problem is in the first redirection made in a transparent way for me.
    Refering to the post of Frank Niphus:
    Switching Http/Https in ADF
    you can understand my problem and we can see a workaround, but I want all the requests to go to https, not only some of them like is done in this post.
    Regards

  • Problem while reading data  from USB with JSR80

    Hi
    Iam using Fedora 9 with 32 bit.
    Iam using JSR80 api to read the data from USB devices.
    I successfully set-up the code as per given on JSR80 site on my eclipsce ide.
    below is my code which iam using to read data from usb
    import com.ibm.jusb.*;
    import java.util.List;
    import javax.usb.*;
    import java.util.List;
    public class USBReader {
    public static  UsbInterface interf = null;
         public static void main(String[] args) {
              try
            {// Access the system USB services, and access to the root
             // hub. Then traverse through the root hub.
               System.out.println("Application started");
             UsbServices services = UsbHostManager.getUsbServices();
             UsbHub rootHub = services.getRootUsbHub();
             traverse(rootHub);
             testIO(rootHub);
            } catch (Exception e) {
                 System.out.println("The Exception occured"+e.getMessage());
          public static void traverse(UsbDevice device){
               System.out.println("Iam in traverse ");
               if (device.isUsbHub()){  
                    // This is a USB Hub, traverse through the hub.
                    System.out.println("The device is hub");
                    List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
                    System.out.println("The attached devices size:"+attachedDevices.size());
                    for (int i=0; i<attachedDevices.size(); i++){
                         traverse((UsbDevice) attachedDevices.get(i));
                    if(attachedDevices !=null){
                         for(int j=0;j<attachedDevices.size();j++){
                              System.out.println("The device is"+attachedDevices.get(j));
           else{
              // This is a USB function, not a hub.
              // Do something.
                System.out.println("The device is not hub");
          public static void testIO(UsbDevice device) throws UsbClaimException, UsbNotActiveException, UsbDisconnectedException, UsbException{
               System.out.println("Iam in testIO");
              try{
                 // Access to the active configuration of the USB device, obtain
                 // all the interfaces available in that configuration.
                 UsbConfiguration config = device.getActiveUsbConfiguration();
                 List totalInterfaces = config.getUsbInterfaces();
                 System.out.println("The Total interfaces: "+totalInterfaces.size());
                 // Traverse through all the interfaces, and access the endpoints
                 // available to that interface for I/O.
                 for (int i=0; i<totalInterfaces.size(); i++){
                    interf = (UsbInterface) totalInterfaces.get(i);
                    System.out.println("The interfaces are "+totalInterfaces.get(i));
                    String strinf=interf.getInterfaceString();
                    System.out.println("Claimed Status: "+interf.isClaimed());
                    System.out.println("Active status : "+interf.isActive());
                    System.out.println("Settings :"+interf.getNumSettings());
                    //interf.release();
                    interf.claim();
                    List totalEndpoints = interf.getUsbEndpoints();
                    for (int j=0; j<totalEndpoints.size(); j++){
                       // Access the particular endpoint, determine the direction
                       // of its data flow, and type of data transfer, and open the
                       // data pipe for I/O.
                       UsbEndpoint ep = (UsbEndpoint) totalEndpoints.get(i);
                       int direction = ep.getDirection();
                       int type = ep.getType();
                       UsbPipe pipe = ep.getUsbPipe();
                       pipe.open();
                       // Perform I/O through the USB pipe here.
                       pipe.close();
                    interf.release();
              } catch (Exception e) {
                   System.out.println("Exception in TestIO"+e.getMessage());
                   e.printStackTrace();
    }When i execute the above code i get the following exception
    Exception in TestIOCannot claim an interface on a virtual root hub.
    javax.usb.UsbException: Cannot claim an interface on a virtual root hub.
         at com.ibm.jusb.VirtualRootUsbHubImp$VirtualRootUsbInterfaceOsImp.claim(VirtualRootUsbHubImp.java:143)
         at com.ibm.jusb.os.DefaultUsbInterfaceOsImp.claim(DefaultUsbInterfaceOsImp.java:54)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:109)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:83)
         at USBReader.testIO(USBReader.java:60)
         at USBReader.main(USBReader.java:15)iam not getting the clue for it .

    Cannot claim an interface on a virtual root hubSo don't do that? I have no idea how to tell, but clearly you need to test a few more attributes before you claim. Or else just log the claim error and continue with the next interface.

  • New time capsule stops working with http connections

    I have the latest 2TB Time Capsule. I've been getting a weird issue where my I can no longer can do http connections (i.e. browse the internet) but I can still use other internet capable services like Skype or Steam. It seems that traffic through port 80 just seems to stop working. All of my devices on my network experience the issue. I have even exchanged Time Capsules but the issue still presists.
    Does anyone have any ideas?

    Here's a traceroute when things work:
    traceroute 8.8.8.8
    traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
    1  192.168.1.1 (192.168.1.1)  3.637 ms  1.030 ms  0.924 ms
    2  69.254.248.1 (69.254.248.1)  10.644 ms  10.237 ms  10.590 ms
    3  te-7-1-ur02.olathe.ks.indepen.comcast.net (68.87.234.209)  10.453 ms  10.177 ms  10.519 ms
    4  te-4-4-ar02.independence.mo.indepen.comcast.net (68.87.234.5)  10.464 ms  11.360 ms  13.087 ms
    5  68.87.234.29 (68.87.234.29)  11.762 ms  12.583 ms  13.066 ms
    6  be-20-702-cr01.sanjose.ca.ibone.comcast.net (68.86.89.37)  28.948 ms  21.847 ms  24.969 ms
    7  he-0-11-0-0-pe04.350ecermak.il.ibone.comcast.net (68.86.83.58)  22.267 ms  22.081 ms  21.251 ms
    8  * * *
    9  * * *
    10  72.14.237.110 (72.14.237.110)  26.647 ms
        72.14.237.108 (72.14.237.108)  25.617 ms
        72.14.237.110 (72.14.237.110)  53.230 ms
    11  72.14.232.141 (72.14.232.141)  33.403 ms  33.622 ms
        209.85.248.228 (209.85.248.228)  34.010 ms
    12  216.239.46.193 (216.239.46.193)  33.824 ms  33.433 ms  34.014 ms
    13  * * *
    14  google-public-dns-a.google.com (8.8.8.8)  37.414 ms  34.587 ms  34.306 ms
    Here's the output when it doesn't:
    traceroute 8.8.8.8
    traceroute: unknown host 8.8.8.8
    I just changed my DNS. I'll report back in a day to say if it fixed anything.

  • Reading Data from Buffer

    Hi all,
           I have a custom RFC which makes use of IDOC_INPUT_BOMMAT to create a BOM.But the BOM is not yet committed and i need to retrieve this data.If i put a break-point after the call to the FM IDOC_INPUT_BOMMAT and at the same time check the database table it's not yet present in the table.We tried all methods but could not succeed.Please let us know if the data can be read through buffers.If so which FM should i use to get this data .. ?
    Cheers
    Nishanth

    Hi,
    I don't think you will be able to read the data from buffer. Even if you can find it, getting the right strcutures for the data you are looking for will be very tedious.
    Regards,
    Ravi
    Note :Please mark the helpful answers

  • Save XML with HTTP connection

    Hello,
    I have an XML file and I need to save it in a HTTP patch.
    The transformation code it's working and I created an HTTP connection(SM59) that is working as well. I'm never did that before but I guess that I'm open the connection on my ABAP code, since it ask for user and password to login, but I have no idea how to save something in there.
    Follow the code:
    data: client      type ref to if_http_client.
    data: request     type ref to if_http_request.
    cl_http_client=>create_by_destination(
                     exporting destination = http_dest
                     importing client = client ).
       call method client->request->set_method(
         if_http_request=>co_request_method_get ).
    * set protocol version
       client->request->set_version(
            if_http_request=>co_protocol_version_1_0 ).
    * content type
       call method client->request->if_http_entity~set_content_type
         exporting
           content_type = 'multipart/form-data'.
    *** Send HTTP request
       call method client->send
         exceptions
           http_communication_failure = 1
           http_invalid_state         = 2
           http_processing_failed     = 3
           http_invalid_timeout       = 4
           others                     = 5.
       if sy-subrc <> 0.
         raise connection_error.
       endif.
    *** Get GTTP response
       call method client->receive
         exceptions
           http_communication_failure = 1
           http_invalid_state         = 2
           http_processing_failed     = 3
           others                     = 4.
       if rc = 0.
    *** Read HTTP RETURN CODE
         client->response->get_status( importing code = http_rc ).
         if http_rc <> 200.
           """KO
         else. "status 200 ->>OK
           clear: xml_xstring.
           xml_xstring = client->response->get_data( ).
         endif.
       endif.
    * VERY IMPORTANT: close your connection
       client->close( ).
       call function 'SRTUTIL_HELPER_XML_SHOW'
         exporting
           xdoc = xml_xstring
           html = abap_false.
    Thanks,
    Andréa

    Hello Andrea,
    Did you try using IF_HTTP_CLIENT~AUTHENTICATE method of class CL_HTTP_CLIENT.

  • Reading file from AS with details

    Hi guys,
    I want to read files from a directory on AS.
    I used the FM SUBST_GET_FILE_LIST.
    It works fine, but I'd like to know the file creation date.
    I have to use this date time to decide which file I have to manage.
    I thought the MTIME field was the answer, but it returns to me a number that I don't understand.
    Any idea about it, or is there a FM that give to me the file creation date, modification date ecc
    Regards
    Jampierre

    From the description MTIME is the Unix time - "last modification date, seconds since 1970"; Meaning this number is time in seconds from 1970; Did you check out the MOD_DATE and MOD_TIME fields in the same output table?
    There are lot of threads in SDN regarding this and conversion of unix time to std date/time... please search in SDN,
    Convert UNIX timestamp into Date and Time
    Retrieve File creation date

  • Error While reading CLOB from Oracle using WebLogic Connection Pool, Works fine with out using pool

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

  • Error Unexpected end of file from server with HTTP POST

    Hi everyone,
    I'm coding a simple client to download some information from a local machine in my LAN.
    I have to do this with an http post request.
    When i try to parse the http response the program catch an exception, this one:
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(...)
    the parameter is a JSON request, and of course the response is a JSON formatted.
    i put the http request code:
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.HttpURLConnection;
    import java.net.URL;
    public class HttpDownloaderThread  extends Thread{
         private String url;
            private String param;
         private HttpDownloadListener listener;
         private HttpURLConnection connection=null;
         private InputStream is;
            private OutputStreamWriter wr;
         public HttpDownloaderThread(String _url,String param, HttpDownloadListener _listener){
              url = _url;
              listener = _listener;
                    this.param=param;
         public void run(){
              try{
                   connection=(HttpURLConnection)new URL(url).openConnection();
                            connection.setRequestMethod("POST");
                            connection.setReadTimeout(5000);
                            connection.setRequestProperty("Content-Type", "application/jsonrequest");
                            connection.setDoOutput(true);
                            wr = new OutputStreamWriter(connection.getOutputStream());
                            wr.write(param, 0, param.length());
                            wr.flush();
                            int responseCode=0;
                   System.out.println();
                            try{
                             responseCode= connection.getResponseCode();
                            }catch(Exception e){
                                e.printStackTrace();
                   if (responseCode == HttpURLConnection.HTTP_OK){
                        is = connection.getInputStream();
                                     BufferedReader rd = new BufferedReader(new InputStreamReader(is));
                                    String line;
                                    while ((line = rd.readLine()) != null) {
                                        System.out.println(line);
                        closeHttpConnection();
                        listener.resourceDownloaded(url, null);
                                else{
                                closeHttpConnection();
                                listener.downloadFailed(url, new Exception("Http error: " + Integer.toString(responseCode)));
              }catch(Exception e){
                   e.printStackTrace();
                   listener.downloadFailed(url, e);
              }finally{
         public void closeHttpConnection(){
              if (is != null){
                   try{
                        is.close();
                                    wr.close();
                   }catch (Exception e){
                   }finally{
                        is = null;
                                    wr=null;
              if (connection != null){
                   try{
                        connection.disconnect();
                   }catch (Exception e){
                   }finally{
                        connection = null;
    }there's someone who know's why??
    Thanks to everyone :)
    Thomas.

    jole_star wrote:
    this problem also happen to me,.So since you provided actually no information about your problem you are going to get exactly the same response.
    Please don't hijack old threads. Start your own and provide much much much more information.
    I shall lock this thread.

  • Weird problem with http connection

    hi,
    i'm trying to implement a midlet that connects the mobile to an http server. i've downloaded several midlets and also tried the method given in the MIDP2 api documentation, but i doesn't work, it can't connect.
    i tried it on several phones and some of them freeze during the Connector.open method, but the Nokia 6230i tells that i have to register to GPRS services before i can connect this way. :(
    how is it that i can't connect with my midlet but i can do it through the wap function of the phone ? how can i bypass this problem ?
    thanks.

    i went to the parameters menu and changed "GPRS connection" to "permanent" but it didn't change anything. there doesn't to be any other paramter that could help with this. :(

Maybe you are looking for