Changes between Version 12 and Version 13 of NFR_LARGE_RESOURCES_R0


Ignore:
Timestamp:
11/09/09 20:11:42 (15 years ago)
Author:
pap
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NFR_LARGE_RESOURCES_R0

    v12 v13  
    5252  * [browser:branches/private/meddle/nfr_large_resources/modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/bindata/BinData.java  BinData] : Make BinData abstract class that will have a number of child classes. BinData has the following methods: 
    5353   * {{{public abstract int getSize()}}} -> Gets the size (in bytes) of this bin data. 
    54    * {{{public abstract byte[] getBytes() throws BinSourceNotFoundException}}} -> Gets all the bytes of the BinData and if that is not possible throws the checked exception BinSourceNotFoundException. 
     54   * {{{public abstract byte[] getBytes() throws BinSourceNotFoundException}}} -> Gets all the bytes of the BinData and if that is not possible throws the unchecked exception BinSourceNotFoundException. 
    5555   * {{{public BinData getSub(int begin, int end)}}} -> Gets BinData that holds access to a given range in the byte array source, of the BinData. By default it returns new SubBinData for the range. 
    56    * {{{public byte[] getBytes(int begin, int end) throws BinSourceNotFoundException}}} -> Gets the bytes of the bin data from the 'begin' position to the 'end' position. The default implementation will allocate an array of bytes with the wanted size to be used by the implementations and will assert that the passed parameters are accurate. If the bytes can not by retrieved from the source the checked BinSourceNotFoundException is thrown. 
     56   * {{{public byte[] getBytes(int begin, int end) throws BinSourceNotFoundException}}} -> Gets the bytes of the bin data from the 'begin' position to the 'end' position. The default implementation will allocate an array of bytes with the wanted size to be used by the implementations and will assert that the passed parameters are accurate. If the bytes can not by retrieved from the source the unchecked BinSourceNotFoundException is thrown. 
    5757   * {{{public static void transport(InputStream from, OutputStream to) throws IOException}}} -> A helper method for transporting bytes from one stream to another, its implementation is from the old BinData (now RawBinData). 
    5858   * Other helper methods should be put here if they are not used only by the old BinData (now RawBinData). 
    5959  * [browser:branches/private/meddle/nfr_large_resources/modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/bindata/RawBinData.java  RawBinData] : Represents embedded BinData, it's source byte array is in the memory. That is the old BinData. 
    6060   * It's immutable kind is changed to {{{@Immutable(kind = "raw-bin-data")}}} 
    61    * The implementations of the BinData abstract methods are as they were before this task. The others use the default implementations to allocate byte array only, the checked BinSourceNotFoundException is not thrown anywhere, because the source is in the memory. 
     61   * The implementations of the BinData abstract methods are as they were before this task. The others use the default implementations to allocate byte array only, the unchecked BinSourceNotFoundException is not thrown anywhere, because the source is in the memory. 
    6262  * [browser:branches/private/meddle/nfr_large_resources/modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/bindata/SubBinData.java  SubBinData] : Used to work with parts of the byte array source of the BinData implementations.  
    6363   * It's constructor is private and factory methods are with package visibility, only BinData implementations can instantiate it. 
     
    6868   * When bytes are demanded from it, it opens RandomFileAccess to its source file and seeks and reads from it. 
    6969   * The {{{public abstract int getSize()}}} method returns the size of the file in bytes. 
    70    * When its source file is not found the checked exception BinSourceNotFoundException is thrown. The coders that use that BinData should handle the exception. 
     70   * When its source file is not found the unchecked exception BinSourceNotFoundException is thrown. The coders that use that BinData should handle the exception. 
    7171  * [browser:branches/private/meddle/nfr_large_resources/modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/bindata/RemoteBinData.java  RemoteBinData] (optional for that revision) : Communicates with a remote file source through the Facade. 
    7272   * It's methods use the Facade to retrieve their byte arrays and data. 
    7373   * On the server side there is RawBinData or FileBinData that provides the bytes or data demanded. 
    74    * When the server is down, or the file on the server can not be retrieved the checked BinSourceNotFoundException is thrown. 
     74   * When the server is down, or the file on the server can not be retrieved the unchecked BinSourceNotFoundException is thrown. 
    7575  * [browser:branches/private/meddle/nfr_large_resources/modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/bindata/BinSourceNotFoundException.java  BinSourceNotFoundException] -> Thrown from the BinData implementations when their source could not be found. For example the FileBinData file source, or the RemoteBinData remote file source... 
    7676  * Some ideas for future revisions: