averiguar path de un FileOutputStream
suponjgamos que he realizado
opeSeq=new FileOutputStream("c:abraila.txt");
como puedo averiguar el path del objeto opeSeq, algo del tipo
String path=opeSeq.getPath();
opeSeq=new FileOutputStream("c:abraila.txt");
como puedo averiguar el path del objeto opeSeq, algo del tipo
String path=opeSeq.getPath();
Utiliza mejor un objeto File para crear el OutputStream y sobre ese objeto ya puedes obtener el path.
File fichero=new File("c:abraila.txt");
opeSeq=new FileOutputStream(fichero);
y ahora ya puedes:
fichero.getPath();
fichero.getName();
fichero.getAbsolutePath();
Espero que te sirva, chao
File fichero=new File("c:abraila.txt");
opeSeq=new FileOutputStream(fichero);
y ahora ya puedes:
fichero.getPath();
fichero.getName();
fichero.getAbsolutePath();
Espero que te sirva, chao
