Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > e4b7ea989087cb3ab9e6e72793e02115 > files > 52

apache-poi-manual-3.10.1-3.mga5.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--*** This is a generated file.  Do not edit.  ***-->
<link rel="stylesheet" href="../skin/tigris.css" type="text/css">
<link rel="stylesheet" href="../skin/mysite.css" type="text/css">
<link rel="stylesheet" href="../skin/site.css" type="text/css">
<link media="print" rel="stylesheet" href="../skin/print.css" type="text/css">
<title>POIFS Use Cases</title>
</head>
<body bgcolor="white" class="composite">
<!--================= start Banner ==================-->
<div id="banner">
<table width="100%" cellpadding="8" cellspacing="0" summary="banner" border="0">
<tbody>
<tr>
<!--================= start Group Logo ==================-->
<td width="50%" align="left">
<div class="groupLogo">
<a href="http://poi.apache.org"><img border="0" class="logoImage" alt="Apache POI" src="../resources/images/group-logo.jpg"></a>
</div>
</td>
<!--================= end Group Logo ==================-->
<!--================= start Project Logo ==================--><td width="50%" align="right">
<div align="right" class="projectLogo">
<a href="http://poi.apache.org/"><img border="0" class="logoImage" alt="POI" src="../resources/images/project-logo.jpg"></a>
</div>
</td>
<!--================= end Project Logo ==================-->
</tr>
</tbody>
</table>
</div>
<!--================= end Banner ==================-->
<!--================= start Main ==================-->
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary="nav" id="breadcrumbs">
<tbody>
<!--================= start Status ==================-->
<tr class="status">
<td>
<!--================= start BreadCrumb ==================--><a href="http://www.apache.org/">Apache</a> | <a href="http://poi.apache.org/">POI</a><a href=""></a>
<!--================= end BreadCrumb ==================--></td><td id="tabs">
<!--================= start Tabs ==================-->
<div class="tab">
<span class="selectedTab"><a class="base-selected" href="../index.html">Home</a></span> | <script language="Javascript" type="text/javascript">
function printit() {  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}
</script><script language="Javascript" type="text/javascript">
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
    document.write('  <a title="PRINT this page OUT" href="javascript:printit()">PRINT</a>');
}
</script>
</div>
<!--================= end Tabs ==================-->
</td>
</tr>
</tbody>
</table>
<!--================= end Status ==================-->
<table id="main" width="100%" cellpadding="8" cellspacing="0" summary="" border="0">
<tbody>
<tr valign="top">
<!--================= start Menu ==================-->
<td id="leftcol">
<div id="navcolumn">
<div class="menuBar">
<div class="menu">
<span class="menuLabel">Apache POI</span>
    
<div class="menuItem">
<a href="../index.html">Top</a>
</div>
  
</div>
<div class="menu">
<span class="menuLabel">POIFS</span>
    
<div class="menuItem">
<a href="index.html">Overview</a>
</div>
    
<div class="menuItem">
<a href="how-to.html">How To</a>
</div>
    
<div class="menuItem">
<a href="embeded.html">Embeded Documents</a>
</div>
    
<div class="menuItem">
<a href="fileformat.html">File System Documentation</a>
</div>
    
<div class="menuItem">
<span class="menuSelected">Use Cases</span>
</div>
  
</div>
</div>
</div>
<form target="_blank" action="http://www.google.com/search" method="get">
<table summary="search" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap">
                          Search Apache POI<br>
<input value="poi.apache.org" name="sitesearch" type="hidden"><input size="10" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="GO" type="submit"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td colspan="3"><img height="7" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td class="bottom-left-thick"></td><td bgcolor="#a5b6c6"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td class="bottom-right-thick"></td>
</tr>
</table>
</form>
</td>
<!--================= end Menu ==================-->
<!--================= start Content ==================--><td>
<div id="bodycol">
<div class="app">
<div align="center">
<h1>POIFS Use Cases</h1>
</div>
<div class="h3">
  
  
    
<a name="POIFS+Use+Cases"></a>
<div class="h3">
<h3>POIFS Use Cases</h3>
</div>
      
<a name="Use+Case+1%3A+Read+existing+file+system"></a>
<div class="h4">
<h4>Use Case 1: Read existing file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
              POIFS client- wants to read content of file
                  system<br>
              POIFS - understands POIFS file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
            1. POIFS client requests POIFS to read a POIFS file
                system, providing an
                <span class="codefrag">InputStream</span>
                containing POIFS file system in question.<br>
            2. POIFS reads from the
                <span class="codefrag">InputStream</span> in
                512 byte blocks.<br>
            3. POIFS verifies that the first block begins with
                the well known signature
                (
                <span class="codefrag">0xE11AB1A1E011CFD0</span>)<br>
            4. POIFS reads the Block Allocation Table from the
                first block and, if necessary, from the XBAT
                blocks.<br>
            5. POIFS obtains the start block of the Property
                Table and reads the Property Table (use case 9,
                read file)<br>
            6. POIFS reads the individual entries in the Property
                Table<br>
            7. POIFS obtains the start block of the Small Block
                Allocation Table and reads the Small Block
                Allocation Table (use case 9, read file)<br>
            8. POIFS obtains the start block of the Small Block
                store from the first entry in the Property Table
                and reads the Small Block Array (use case 9, read
                file)<br>
        
</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">
	        2a. If the last block read is not a 512 byte
                block, the
                <span class="codefrag">InputStream</span> is not that of
                a POIFS file system, and POIFS throws an
                appropriate exception.
            <br>
		    3a. If the signature is incorrect, the
            <span class="codefrag">InputStream</span> is not that of a POIFS
            file system, and POIFS throws an appropriate
		    exception.<br>
	    
</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+2%3A+Write+file+system"></a>
<div class="h4">
<h4>Use Case 2: Write file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Primary Actor:</th>
	    <th colspan="1" rowspan="1">POIFS client</th>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Scope:</th>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Level:</th>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Stakeholders and Interests:</th>
	    <td colspan="1" rowspan="1">
            POIFS client- wants to write file system out.<br>
            POIFS - knows how to write file system out.
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Precondition:</th>
	    <td colspan="1" rowspan="1">
	        File system has been read (use case 1, read
	            existing file system) and subsequently modified
	            (use case 4, replace file in file system; use case
	            5, delete file from file system; or use case 6,
	            write new file to file system; in any
	            combination)
	      <br>or<br>
	        File system has been created (use case 3, create
	            new file system)
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Minimal Guarantee:</th>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Main Success Guarantee:</th>
	    <td colspan="1" rowspan="1">
                1. POIFS client provides an
                    <span class="codefrag">OutputStream</span>
                    to write the file system to.
                <br>
                2. POIFS gets the sizes of the Property Table and
                    each file in the file system.<br>
                3. If any files in the file system requires storage
                    in a Small Block Array, POIFS creates a Small
                    Block Array of sufficient size to hold all of the
                    small files.<br>
                4. POIFS calculates the number of big blocks needed
                    to hold all of the large files, the Property
                    Table, and, if necessary, the Small Block Array
                    and the Small Block Allocation Table.<br>
                5. POIFS creates a set of big blocks sufficient to
                    store the Block Allocation Table<br>
                6. POIFS creates and writes the header block<br>
                7. POIFS writes out the XBAT blocks, if needed.<br>
                8. POIFS writes out the Small Block Array, if
                    needed<br>
                9. POIFS writes out the Small Block Allocation Table,
                    if needed<br>
                10. POIFS writes out the Property Table<br>
                11. POIFS writes out the large files, if needed<br>
                12. POIFS closes the <span class="codefrag">OutputStream</span>.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Extensions:</th>
	    <td colspan="1" rowspan="1">
              6a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              7a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              8a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              9a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              10a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              11a. Exceptions writing to the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
              12a. Exceptions closing the
                  <span class="codefrag">OutputStream</span> will be propagated back
                  to the POIFS client.
              <br>
	    
</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+3%3A+Create+new+file+system"></a>
<div class="h4">
<h4>Use Case 3: Create new file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Primary Actor:</th>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Scope:</th>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Level:</th>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Stakeholders and Interests:</th>
	    <td colspan="1" rowspan="1">
	        POIFS client- wants to create a new file
	            system<br>
    		POIFS - knows how to create a new file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Precondition:</th>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Minimal Guarantee:</th>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<th colspan="1" rowspan="1">Main Success Guarantee:</th>
	    <td colspan="1" rowspan="1">
	      	POIFS creates an empty Property Table.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<th colspan="1" rowspan="1">Extensions:</th>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+4%3A+Replace+file+in+file+system"></a>
<div class="h4">
<h4>Use Case 4: Replace file in file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        1. POIFS client- wants to replace an existing file in
	            the file system<br>
		    2. POIFS - knows how to manage the file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">
	      Either
	      <br>
<br>
	        The file system has been read (use case 1, read
	            existing file system) and a file has been
	            extracted from the file system (use case 7, read
	            existing file from file system)
	      <br>
<br>or<br>
<br>
	        The file system has been created (use case 3,
	            create new file system) and a file has been
	            written to the file system (use case 6, write new
	            file to file system)
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        1. POIFS discards storage of the existing file.<br>
  	        2. POIFS updates the existing file's entry in the
	            Property Table<br>
	        3. POIFS stores the new file's data
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">
	        1a. POIFS throws an exception if the file does not
	            exist.
	    </td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+5%3A+Delete+file+from+file+system"></a>
<div class="h4">
<h4>Use Case 5: Delete file from file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        * POIFS client- wants to remove a file from a file
	            system<br>
		    * POIFS - knows how to manage the file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">
	      Either<br>
<br>
	        The file system has been read (use case 1, read
	            existing file system) and a file has been
	            extracted from the file system (use case 7, read
	            existing file from file system)<br>
	      
<br>
	      or<br>
	      
<br>
	        The file system has been created (use case 3,
	            create new file system) and a file has been
	            written to the file system (use case 6, write new
	            file to file system)
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	      	1. POIFS discards the specified file's storage.<br>
	      	2. POIFS discards the file's Property Table
	      	    entry.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">
	        1a. POIFS throws an exception if the file does not
	            exist.
	    </td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+6%3A+Write+new+file+to+file+system"></a>
<div class="h4">
<h4>Use Case 6: Write new file to file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        * POIFS client- wants to add a new file to the file
	            system<br>
		    * POIFS - knows how to manage the file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">The specified file does not yet exist in the file
	        system</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        1. The POIFS client provides a file name<br>
	        2. POIFS creates a new Property Table entry for the
	            new file<br>
	        3. POIFS provides the POIFS client with an
	            <span class="codefrag">OutputStream</span> to write to.<br>
	        4. The POIFS client writes data to the provided
	            <span class="codefrag">OutputStream</span>.<br>
	        5. The POIFS client closes the provided
	            <span class="codefrag">OutputStream</span>
<br>
	        6. POIFS updates the Property Table entry with the
	            new file's size
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">
	        1a. POIFS throws an exception if a file with the
	            specified name already exists in the file
	            system.<br>
            1b. POIFS throws an exception if the file name is
                too long. The limit on file name length is 31
                characters.
	    </td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+7%3A+Read+existing+file+from+file+system"></a>
<div class="h4">
<h4>Use Case 7: Read existing file from file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        * POIFS client- wants to read a file from the file
	            system<br>
		    * POIFS - knows how to manage the file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">
	        * The file system has been read (use case 1, read
	            existing file system) or has been created and
	            written to (use case 3, create new file system;
	            use case 6, write new file to file system).<br>
            * The specified file exists in the file system.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        * The POIFS client provides the name of a file to be read <br>
            * POIFS provides an <span class="codefrag">InputStream</span> to read from. <br>
            * The POIFS client reads from the <span class="codefrag">InputStream</span>.<br>
            * The POIFS client closes the <span class="codefrag">InputStream</span>.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">1a. POIFS throws an exception if no file with the
	        specified name exists.</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+8%3A+Read+file+system+directory"></a>
<div class="h4">
<h4>Use Case 8: Read file system directory</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        * POIFS client- wants to know what files exist in
	            the file system<br>
            * POIFS - knows how to manage the file system
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">The file system has been read (use case 1, read
	        existing file system) or created (use case 3, create
	        new file system)</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        1. The POIFS client requests the file system
	            directory.
		    2. POIFS returns an <span class="codefrag">Iterator</span>. The
		    <span class="codefrag">Iterator</span> will not include the root
		    entry in the Property Table, and may be an
		    <span class="codefrag">Iterator</span> over an empty
		    <span class="codefrag">Collection</span>.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+9%3A+Read+file"></a>
<div class="h4">
<h4>Use Case 9: Read file</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	            POIFS - POIFS needs to read a file, or something
	            resembling a file (i.e., the Property Table, the
	            Small Block Array, or the Small Block Allocation
	            Table)
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        1. POIFS begins with a start block, a file size, and
	            a flag indicating whether to use the Big Block
	            Allocation Table or the Small Block Allocation
	            Table<br>
            2. POIFS returns an <span class="codefrag">InputStream</span>.<br>
            3. Reads from the <span class="codefrag">InputStream</span> are
                performed by walking the specified Block
                Allocation Table and reading the blocks
                indicated.<br>
            4. POIFS closes the <span class="codefrag">InputStream</span> when
                finished reading the file, or its client wants to
                close the <span class="codefrag">InputStream</span>.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">3a. An exception will be thrown if the specified Block
	        Allocation Table is corrupt, as evidenced by an index
	        pointing to a non-existent block, or by a chain
	        extending past the known size of the file.</td>
	  
</tr>
	
</table>
      
      
<a name="Use+Case+10%3A+Rename+existing+file+in+the+file+system"></a>
<div class="h4">
<h4>Use Case 10: Rename existing file in the file system</h4>
</div>
        
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Primary Actor:</em></td>
	    <td colspan="1" rowspan="1">POIFS client</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Scope:</em></td>
	    <td colspan="1" rowspan="1">POIFS</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Level:</em></td>
	    <td colspan="1" rowspan="1">Summary</td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Stakeholders and Interests:</em></td>
	    <td colspan="1" rowspan="1">
	        * POIFS client- wants to rename an existing file in
	            the file system.<br>
            * POIFS - knows how to manage the file system.
	    </td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Precondition:</em></td>
	    <td colspan="1" rowspan="1">
	        * The file system is has been read (use case 1, read
	            existing file system) or has been created and
	            written to (use case 3, create new file system;
	            use case 6, write new file to file system.<br>
            * The specified file exists in the file system.<br>
            * The new name for the file does not duplicate
                another file in the file system.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Minimal Guarantee:</em></td>
	    <td colspan="1" rowspan="1">None</td>
	  
</tr>
	  
<tr class="b">
	    
<td colspan="1" rowspan="1"><em>Main Success Guarantee:</em></td>
	    <td colspan="1" rowspan="1">
	        1. POIFS updates the Property Table entry for the
	            specified file with its new name.
	    </td>
	  
</tr>
	  
<tr class="a">
	    
<td colspan="1" rowspan="1"><em>Extensions:</em></td>
	    <td colspan="1" rowspan="1">
	        * 1a. If the old file name is not in the file
	            system, POIFS throws an exception.<br>
            * 1b. If the new file name already exists in the
                file system, POIFS throws an exception.<br>
            * 1c. If the new file name is too long (the limit is
                31 characters), POIFS throws an exception.
	    </td>
	  
</tr>
	
</table>
      
    
  

<div id="authors" align="right">by&nbsp;Marc Johnson</div>
</div>
</div>
</div>
</td>
<!--================= end Content ==================-->
</tr>
</tbody>
</table>
<!--================= end Main ==================-->
<!--================= start Footer ==================-->
<div id="footer">
<table summary="footer" cellspacing="0" cellpadding="4" width="100%" border="0">
<tbody>
<tr>
<!--================= start Copyright ==================-->
<td colspan="2">
<div align="center">
<div class="copyright">
              Copyright &copy; 2002-2012&nbsp;The Apache Software Foundation. All rights reserved.<br>
              Apache POI, POI, Apache, the Apache feather logo, and the Apache 
              POI project logo are trademarks of The Apache Software Foundation.
            </div>
</div>
</td>
<!--================= end Copyright ==================-->
</tr>
<tr>
<td align="left">
<!--================= start Host ==================-->
<!--================= end Host ==================--></td><td align="right">
<!--================= start Credits ==================-->
<div align="right">
<div class="credit"></div>
</div>
<!--================= end Credits ==================-->
</td>
</tr>
</tbody>
</table>
</div>
<!--================= end Footer ==================-->
</body>
</html>