Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Main {
- public static void main(String[] args) throws IOException, ClassNotFoundException {
- // Przykładowa tablica bajtów
- byte[] data = new byte[1024];
- // Tworzenie ByteArrayInputStream
- ByteArrayInputStream bais = new ByteArrayInputStream(data);
- // Tworzenie ObjectInputStream
- ObjectInputStream ois = new ObjectInputStream(bais);
- // Odczytanie obiektu File
- File file = (File) ois.readObject();
- // Zamknięcie strumieni
- ois.close();
- bais.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement