Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static char[] lerIntervalo(int min, int max) throws IOException{
- char[] cBuffer;
- BufferedReader leitorTexto = null;
- FileInputStream inputStream = null;
- try {
- inputStream = new FileInputStream(DIRETORIO+ARQUIVO);
- //inputStream.getChannel().position(min);
- inputStream.getChannel().position(min);
- leitorTexto = new BufferedReader(new InputStreamReader(inputStream));
- cBuffer = new char[inputStream.available()];
- leitorTexto.read(cBuffer,min,max);
- return cBuffer;
- } catch(IOException e){
- e.printStackTrace();
- } finally {
- try {
- leitorTexto.close();
- } catch(IOException e){
- e.printStackTrace();
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement