Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4408059

File should be made abstract to allow modeling platform-specific filesystem semantics

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Name: boT120536 Date: 01/24/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
      Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)

      java.io.File should be made to implement a 'FileInterface' (or other suitable
      name), and functions should return this type to allow environments modeling
      filesystem semantics to fit in tranparently. While 'File' would be a more
      suitable name, perhaps with the current file moving to 'FileImpl', this
      wouldn't be feasible, given that it would require modications to existing
      applications (given the lack of a Factory/SPI for File's).

      Likewise, a getInputStream() and getOutputStream() should be added, eliminating
      the user's need to directly instancsiate a File{In|Out}putStream (just as is
      done with Socket and Process).

      By allowing simple subclassing of File and encapsulating the creation of
      streams, alternate backends could be integrated into existing applications with
      ease. Apparent applications would be a JDBC-backed interface to heirarchically
      stored BLOB's, or a transparent interface to the FTP procotocol. With the
      availablity of SMB client packages, the added benefit should be clear.
      (Review ID: 115515)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                bonealsunw Bret O'neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: