AZK BG Java-IO

Home > Preview

The flashcards below were created by user flashsmilenet on FreezingBlue Flashcards.


  1. Class System is class of
    java.lang
  2. class System encapsulates...
    ... several aspects of the run-time environment
  3. System contains predefined stream variables:
    in, out, and err
  4. in, out, and err declared as:
    This means:
    • public, final, and static within System
    • This means they can be used by any other part of your program and without reference to a specific System object.
  5. System.out refers to the...
    Which is by default ...
    • ... standard output stream
    • ... console
  6. System.in refers to the ...
    Which is by default ...
    • ... standard input stream
    • ... keyboard
  7. System.err refers to the ...
    Which is by default ...
    • ... standard error stream
    • ... console
  8. System.in is an object of type ...
    ... InputStream
  9. System.out is an object of type
    ... PrintStream
  10. System.err is an object of type ...
    ... PrintStream
  11. InputStream is a class of ...
    java.io.InputStream
  12. PrintStreamis a class of ...
    java.io.OutputStream.FilterOutputStream.PrintStream
  13. System.in is an instance of ...
    • ... InputStream,
    • so automatically have access to the methods defined by InputStream
  14. System.out is instance of ...
    • PrintStream,
    • so automatically have access to the methods defined by PrintStream
  15. System.err is instance of ...
    • PrintStream,
    • so automatically have access to the methods defined by PrintStream
  16. Methods of java.io.InputStream (9)
    • 1 - int     available()
    • 2 - void     close()
    • 3 - void     mark(int readlimit)
    • 4 - boolean     markSupported()
    • 5 - abstract int     read()
    • 6 - int     read(byte[ ] b)
    • 7 - int     read(byte[ ] b, int off, int len)
    • 8 - void     reset()
    • 9 - long     skip(long n)
  17. Returns number of bytes currently available for reading
    • int     available()
    • java.io.InputStream
  18. int     available()
    • java.io.InputStream
    • Returns number of bytes currently available for reading
  19. Closes this input source
    • void     close()
    • java.io.InputStream
  20. void     close()
    • java.io.InputStream
    • Closes this input source
  21. Places a marks at the current point in the input stream that will remain valid until "readlimit" bytes are read
    • void     mark(int readlimit)
    • java.io.InputStream
  22. void     mark(int readlimit)
    • java.io.InputStream
    • Places a marks at the current point in the input stream that will remain valid until "readlimit" bytes are read
  23. Returns "true" if this input stream supports the mark and reset methods
    • boolean     markSupported()
    • java.io.InputStream
  24. boolean     markSupported()
    • java.io.InputStream
    • Returns "true" if this input stream supports the mark and reset methods
  25. Reads the next byte of data from the input stream.
    • abstract int     read()
    • java.io.InputStream
  26. abstract int     read()
    • java.io.InputStream
    • Reads the next byte of data from the input stream.
  27. Reads some number of bytes from the input stream and stores them into the buffer array b
    • int     read(byte[ ] b)
    • java.io.InputStream
  28. int     read(byte[ ] b)
    • java.io.InputStream
    • Reads some number of bytes from the input stream and stores them into the buffer array b
  29. Attempts to reads up to "len" bytes of data from the input stream into buffer array "b" starting at "b[off]"
    • int     read(byte[ ] b, int off, int len)
    • java.io.InputStream
  30. int     read(byte[ ] b, int off, int len)
    • java.io.InputStream
    • Attempts to reads up to "len" bytes of data from the input stream into buffer array "b" starting at "b[off]"
  31. Resets the input pointer to the previously "set" mark
    • void     reset()
    • java.io.InputStream
  32. void     reset()
    • java.io.InputStream
    • Resets the input pointer to the previously "set" mark
  33. Skips over and discards n bytes of data from this input stream.
    • long     skip(long n)
    • java.io.InputStream
  34. long     skip(long n)
    • java.io.InputStream
    • Skips over and discards n bytes of data from this input stream.
  35. Methods of java.io.OutputStream (5)
    • 1 - void     close()
    • 2 - void     flush()
    • 3 - void     write(int b)
    • 4 - void     write(byte[ ] b)
    • 5 - void     write(byte[ ] b, int off, int len)
  36. Closes this output stream
    • void     close()
    • java.io.OutputStream
  37. void     close()
    • java.io.OutputStream
    • Closes this output stream
  38. Causes any output that has been buffered to be sent to its destination. That is "flashes" the output buffer
    • void     flush()
    • java.io.OutputStream
  39. void     flush()
    • java.io.OutputStream
    • Causes any output that has been buffered to be sent to its destination. That is "flashes" the output buffer
  40. Writes the single specified byte to this output stream
    • void     write(int b)
    • java.io.OutputStream
  41. void     write(int b)
    • java.io.OutputStream
    • Writes the single specified byte to this output stream
  42. Writes b.length bytes from the specified byte array to this output stream
    • void     write(byte[ ] b)
    • java.io.OutputStream
  43. void     write(byte[ ] b)
    • java.io.OutputStream
    • Writes b.length bytes from the specified byte array to this output stream
  44. Writes "len" bytes from the specified byte array starting at offset "off" to this output stream
    • void     write(byte[ ] b, int off, int len)
    • java.io.OutputStream
  45. void     write(byte[ ] b, int off, int len)
    • java.io.OutputStream
    • Writes "len" bytes from the specified byte array starting at offset "off" to this output stream

Card Set Information

Author:
flashsmilenet
ID:
326858
Filename:
AZK BG Java-IO
Updated:
2016-12-17 14:55:00
Tags:
AZK BG Java IO
Folders:
AZK BG Java
Description:
AZK BG Java-IO
Show Answers:

Home > Flashcards > Print Preview