Questions tagged as 'io'

2
answers

Why does my try / catch only accept "Exception e" (Generic)?

I want to specify the exceptions, not this generalized way, however, item.write only accepts Exception e public File saveFile(FileItem item, File dirFile, String filename) { dirFile.mkdirs(); File file = FileUtils...
asked by 18.03.2015 / 19:00
1
answer

What is non-blocking I / O?

What is non-blocking I / O ? What are the uses of a language with non-blocking I / O ? What are the practical applications of non-blocking I / O ? It certainly does not get into opinion issues, so I wanted to know the possible issues...
asked by 21.02.2017 / 16:33
2
answers

StreamWriter Class

My idea is to create a system to insert new employees through the CadastrarFuncionario() method, putting the properties of the class ( ID, nome, CPF ) inside a file named officials.txt. With the logic used by me, the values are i...
asked by 02.08.2017 / 15:40
1
answer

How to read a list of serialized objects saved in a file in java? [duplicate]

I was looking to work with serialization in java files and read this tutorial on how to write the object in the file and this one on the how to read the file object Then I created the following class that saves the Adreess object in the...
asked by 17.10.2017 / 00:53
1
answer

How to create a directory in Java using NIO.2 - Java SE 7

The java.nio API is part of the Java SE platform since its 1.4 release. Now, starting with Java 7, we have a number of new enhancements in this API and new features, which provide better file system management ( file system ) utility methods...
asked by 27.06.2015 / 00:43
1
answer

Write file.txt

I'm having trouble with a code I put together. I can not find the error. My problem is this: I've created a code that generates combinations of numbers and you should save those combinations in a .txt file. However, when I run the code, it...
asked by 03.09.2016 / 20:19
1
answer

How to write a loop to read a file to an array of structs in C?

Hello. I have a question about how to read numbers from a given file in c to put inside the loop The .txt file will have the following data: 3 Joao Maria branco p Marcio Guess vermelho p Maria Jose branco p 2 Joao Losna Vermelho G Donald T...
asked by 16.11.2016 / 14:35
1
answer

Problems with python code in file i / o

Hello, I am new to python, I'm programming in 3.5.1, I was doing a piece of code that reads and then draws a line from a file: lista = {} # Essa função lê o arquivo e divide ele em linhas, em palavras e depois coloca dentro de um dicionario...
asked by 09.07.2016 / 14:10
1
answer

How not to include the finally and still close IO Streams, Connections, Statements, and other Resources?

We know of the need to close resources (files, connections, also called resources ) consumed in Java, such as OutputStream and InputStream . When we do not close them, we create performance issues and prevent the Garbage Collector...
asked by 28.06.2015 / 17:04
2
answers

Validation of byte through array of bits of an image

I'm trying to validate an incoming image in an FTP folder. The images begin with the "FFD8" bytes and end with the "FFD9" sequence so that you can perform the scan. I'm getting the image in a BufferedImage and converting it to an array...
asked by 29.06.2015 / 22:17