Changeset 5263


Ignore:
Timestamp:
Mar 8, 2010, 1:28:59 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #1444: Implement generic BFS writers and readers/parsers

Added some more helper methods for creating parsers for files in the local file system.

Location:
branches/2.15-stable/src/core/net/sf/basedb/util/bfs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.15-stable/src/core/net/sf/basedb/util/bfs/AnnotationParser.java

    r5225 r5263  
    2222package net.sf.basedb.util.bfs;
    2323
     24import java.io.FileInputStream;
    2425import java.io.IOException;
    2526import java.io.InputStream;
     
    118119  }
    119120 
     121  /**
     122    Utility method for creating an annotation parser for a file in the local
     123    file system.
     124    @param file The file in the local file system
     125  */
     126  public static AnnotationParser create(java.io.File file)
     127    throws IOException
     128  {
     129    return create(new FileInputStream(file), file.getName(), file.length());
     130  }
     131
     132 
    120133  private final EncoderDecoder decoder;
    121134  private InputStream in;
  • branches/2.15-stable/src/core/net/sf/basedb/util/bfs/DataParser.java

    r5236 r5263  
    2222package net.sf.basedb.util.bfs;
    2323
     24import java.io.FileInputStream;
    2425import java.io.IOException;
    2526import java.io.InputStream;
     
    104105  }
    105106 
     107  /**
     108    Utility method for creating a data parser for a file in the local
     109    file system.
     110    @param file The file in the local file system
     111  */
     112  public static DataParser create(java.io.File file)
     113    throws IOException
     114  {
     115    return create(new FileInputStream(file), file.getName(), file.length());
     116  }
     117
     118 
    106119  private final EncoderDecoder decoder;
    107120  private InputStream in;
  • branches/2.15-stable/src/core/net/sf/basedb/util/bfs/MetadataParser.java

    r5225 r5263  
    2222package net.sf.basedb.util.bfs;
    2323
     24import java.io.FileInputStream;
    2425import java.io.IOException;
    2526import java.io.InputStream;
     
    132133  }
    133134 
     135  /**
     136    Utility method for creating a metadata parser for a file in the local
     137    file system.
     138    @param file The file in the local file system
     139  */
     140  public static MetadataParser create(java.io.File file)
     141    throws IOException
     142  {
     143    return create(new FileInputStream(file), file.getName(), file.length());
     144  }
     145 
    134146  private final EncoderDecoder decoder;
    135147  private InputStream in;
Note: See TracChangeset for help on using the changeset viewer.