001 package com.croftsoft.core.io; 002 003 import java.io.*; 004 005 /********************************************************************* 006 * 007 * A generic interface for Object parsers. 008 * 009 * <P> 010 * 011 * @see 012 * Encoder 013 * @version 014 * 2003-05-14 015 * @since 016 * 2000-03-23 017 * @author 018 * <a href="https://www.croftsoft.com/">David Wallace Croft</a> 019 *********************************************************************/ 020 021 public interface Parser 022 ////////////////////////////////////////////////////////////////////// 023 ////////////////////////////////////////////////////////////////////// 024 { 025 026 /********************************************************************* 027 * @param contentLength 028 * 029 * -1 if unknown. 030 *********************************************************************/ 031 public Object parse ( 032 InputStream inputStream, 033 int contentLength ) 034 throws IOException; 035 036 ////////////////////////////////////////////////////////////////////// 037 ////////////////////////////////////////////////////////////////////// 038 }