Questions tagged as 'inputstream'

1
answer

FileWriter and FileOutputStream: When should I work with each of them?

Often we find codes that could be solved by using objects of type FileWriter or FileOutputStream . For example, a simple code that writes " Teste " in the file /tmp/arquivo : With FileWriter : BufferedWriter o...
asked by 11.10.2016 / 08:02
1
answer

Open pdf by URL and PDFView InputStream

I would like the user to enter the product code (in activity_main.xml ) and click the button. The screen changes ( view_pdf.xml ), it would download the PDF ( AnsyTask ) and it would open in PDFView by pdfView.from...
asked by 06.03.2018 / 17:49
0
answers

AudioInputStream.close () not working (Unable to delete file)

I'm having a problem with an AudioInputStream. After making the adjustments I need, I give AudioInputStream.close() (equivalent to InputStream.close() ) so I can delete the file later. But doing so the following exception is d...
asked by 18.02.2016 / 18:00
2
answers

How to read sdcard CSV file?

Currently I read a csv file from the assets folder with the following code: String arquivoCSV = "clientes.csv"; AssetManager manager = context.getAssets(); InputStream inputStream = null; try{ inputStream...
asked by 07.03.2016 / 15:10
1
answer

Close DataInputStream always closes InputStream?

I need to temporarily use a DataInputStream with an inputStream of a socket. Do I need to use close in DataInputStream ? And if I use it would I be closing the inputStream of the socket as well?     
asked by 15.03.2016 / 19:40
1
answer

Save content on the phone itself

I'm doing an application, where I have a list of questions, and if the user quits the application or the screen, I would like to save the questions that he has already answered, by when he re-access that form, the questions will be saved in memo...
asked by 22.12.2016 / 14:41
0
answers

Invalid Http response

I have the following code block public void read( String url ){ try{ urlNormal = new URL("http://"+url+"/sistema.cgi?lermc=0,33"); URLConnection conn = urlNormal.openConnection(); BufferedReader input...
asked by 05.06.2018 / 18:52