@@ -0,0 +1,1488 @@
+package org.apache.hadoop.io;%0A%0Aimport junit.framework.TestCase;%0Aimport org.junit.Test;%0A%0Aimport java.io.*;%0A%0Apublic class TestAltFileInputStream extends TestCase %7B%0A%0A  File file = new File(%22C:%5C%5CUsers%5C%5Cmingleiz%5C%5Ctest.txt%22);%0A%0A  @Test%0A  public void testGetFD() throws Exception %7B%0A%0A      AltFileInputStream afls = new AltFileInputStream(file);%0A      assertNotNull(afls.getFD());%0A%0A      AltFileInputStream afls_ = new AltFileInputStream(afls.getFD(),afls.getChannel());%0A      assertNotNull(afls_.getFD());%0A%0A  %7D%0A%0A  @Test%0A  public void testGetChannel() throws Exception %7B%0A    AltFileInputStream afls = new AltFileInputStream(file);%0A    assertNotNull(afls.getChannel());%0A%0A    AltFileInputStream afls_ = new AltFileInputStream(afls.getFD(),afls.getChannel());%0A    assertNotNull(afls_.getChannel());%0A  %7D%0A  @Test%0A  public void testRead() throws Exception %7B%0A    InputStream inputStream = new FileInputStream(file);%0A    long numberIS = 0;%0A    while (inputStream.read() != -1)%7B%0A      numberIS ++;%0A    %7D%0A    AltFileInputStream alfs = new AltFileInputStream(file);%0A    long numberASIS = 0;%0A    while ( alfs.read() != -1 )%7B%0A      numberASIS ++;%0A    %7D%0A    assertEquals(numberASIS, numberIS);%0A  %7D%0A  @Test%0A  public void testClose() throws Exception %7B%0A    AltFileInputStream afls = new AltFileInputStream(file);%0A    afls.close();%0A    try %7B%0A      afls.read();%0A    %7D catch (IOException ex)%7B%0A      assert (ex.getMessage().equals(%22Stream Closed%22));%0A      return;%0A    %7D%0A    throw new Exception(%22close failure%22);%0A  %7D%0A%7D

Make a test.