Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process error for getting the data from an api using br.readLine
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sayeed
error for getting the data from an api using br.readLine
0 Answer(s)      4 years and 4 months ago
Posted in : Development process


hi
the application is hanging while reading the data using readLine() function . actually the data is coming from remote using particular api call see the following code.

StringBuilder sb = new StringBuilder();

String strtemp;
Runtime runtime = Runtime.getRuntime();

Process process = runtime.exec("cmd.exe /C c:\\curl\\curl -X POST -d \"format=json&api_key=MY739HWQW4PWZ1HIJEWVNSOUAF8EJQ4K\";user[email]=useremail;user[password]=userpassword;user[country]=usercountry;user[mobile_phone]=userphone http://staging-orion.sabsebolo.com/users");

Process process = runtime.exec(url);


BufferedReader inputreader = new BufferedReader(new InputStreamReader(process.getInputStream()));
while ((strtemp = inputreader.readLine()) != null) {


sb=sb.append(strtemp);

}

while executing the above while loop the application is hanging . i find that the application gets hanging while executing inputreader.readLine() function.

please can you help to solve this problem

Advertisement
View Answers

Related Tutorials/Questions & Answers:
error for getting the data from an api using br.readLine - Development process
error for getting the data from an api using br.readLine  hi the application is hanging while reading the data using readLine() function . actually the data is coming from remote using particular api call see the following code
sending data to google chart api from mysql database using java
sending data to google chart api from mysql database using java  how to send data from mysql database to google chart api using java
Advertisements
sending data to google chart api from mysql database using java
sending data to google chart api from mysql database using java  Добовляйтесь в группу "МАЙНКРАФТА" Будьте участниками Группы Помогаите нам и себе Наша группа https://vk.com/club60851464 Есть свой сервер! Хорошая атмосфера
Getting data from servlet into javascript
Getting data from servlet into javascript  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
data type used to store name.(getting an error)
data type used to store name.(getting an error)    Statement stm=con.createStatement(); String query="select * from employee where ename... getting an error like dis: "ename cannot be resolved to a variable" whats
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown... an internal error () that prevented it from fulfilling this request. exception
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown... data from database and display it on the textboxes. <%@page language="java
Retrieve data using Criteria api
Retrieve data using Criteria api  import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Query; import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions; import
Getting and sending data to and from mobile and the system
Getting and sending data to and from mobile and the system  Hi, For getting and sending data to mobile from system.make system is a server.From... in the mobile application.This is done using J2ME also. Regards, Sivakumar.J
get from address using javamail api?
get from address using javamail api?  i want to get from address of particular mail using the javamail api? actually i had done it in one .jsp file... no to composereplymail.jsp using the javascript, m getting message[messageno].getSubject() but when i
Getting Json data from servlet to javascript variable
Getting Json data from servlet to javascript variable  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
Getting an error :(
Getting an error :(  I implemented the same code as above.. But getting this error in console... Console Oct 5, 2012 10:18:14 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server
Need to remove duplicated rows from excel using apache POI API
to remove duplicated rows from excel sheet by using apache poi api oe jxl api...Need to remove duplicated rows from excel using apache POI API  Hi, Need help from you. I am able to generate excel sheet with data also
getting int values from form and insert it in data base in jsp
getting int values from form and insert it in data base in jsp  how...; Hi, You can get the parameter from the request object: String s... = Integer.parseInt(s); Then you can write JDBC code to insert data
Getting Error - Development process
Getting Error   Hi , i am getting error while executing this code. I just want to store date in to database. Dont mistake me for repeated questions... of query values and destination fields are not the same. my table : Add_Data
Error in reading Excel data using jsp
Error in reading Excel data using jsp  ERROR while executing bellow code:java.io.IOException: Invalid header signature; read 576460838270094160...() method shows the following Error message on console
Exporting data from mysql into csv using jsp
Exporting data from mysql into csv using jsp  Hi friends.... I want to export the data from mysql to csv file using... i am having 30 columns in my... in csv file..if i export, am getting the csv file with all data in one row
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. ... .when i done database connection then i get an error..."; // declare a connection by using Connection interface Connection connection = null
Getting Data from XML File (Document)
Getting Data from XML File (Document)   ... from a XML file. All xml files store the data. You can add and modify the data...: This program helps you in retrieving the data from a XML file. It takes a xml file
inserting data from radio buttons to database-ERROR - JSP-Servlet
inserting data from radio buttons to database-ERROR  hi, i have already changed the option field of table question. the code which you give me has... it in the code. but still i am getting the error in the update query. please provide
when sending the mail from java I am getting the below error - JavaMail
when sending the mail from java I am getting the below error   when sending the mail from java I am getting the below error : Exception... the RFC 822 "From" header field using the // value
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
Retrieve data from databse using where in JSP
Retrieve data from databse using where in JSP  Hi, can somebody help me? I have a jsp page. in that i want to get data from the database where... help me. ALL DATABASE CONNECTIONS ARE OK. THE ERROR IS SHOWN IN "WHERE". IT SAYS
uSING JAVA API
uSING JAVA API  How to extract Quickbooks online data using Quickbooks api( Rest ApI) write in java code ? 1.register company account 2... find Quickbooks online data
Retrive the data from the table in data base using jdbc
Retrive the data from the table in data base using jdbc  Retrive the data from the table in data base using jdbc   JDBC Tutorials
Retrieve data from xml using servlets
Retrieve data from xml using servlets  Hi plz send me the code for retrieving the data from xml File using Servlets.   Hi, Do you want... Thanks   Hi, Learn Get Data From the XML File. Thanks
getting files from VSS
getting files from VSS  I am not able to get the files from VSS.I am using following code. and just let me know is localpath attribute is for our local project path? I am getting the problem in this line failed
Hibernate: ORDER BY using Criteria API.
API is very Simplified API for fetching data from Criterion objects. The criteria...Hibernate: ORDER BY using Criteria API.  How to display record in order using Criteria API?   Hibernate Criteria API provides an easy way
A programm for error free transmission of data using UDP in java
A programm for error free transmission of data using UDP in java  Hi... is to create applications for error-free transmission of data (transmitter... error,also the data should be stored in the correct order, and that only one copy
retrieve data from database using jsf
retrieve data from database using jsf  Hello I want an example of source code to retrieve data from database i have a database (oracle) name as db1 it's contain table 'author' composed of three columns idauthor(primary key
 

 

 

DMCA.com