private boolean readToken() throws IOException
	{
		byte token;
		try
		{
			if (this.updateOK)
			{
				this.dataIn.mark(BUFFER_SIZE);
			}
			token = this.dataIn.readByte();
			switch (token)
			{
			case HEADER_TOKEN:
				readHeaderToken();
				break;
			case RESOURCE_TYPE_TOKEN:
				readResourceTypeToken();
				break;
			case RESOURCE_INSTANCE_CREATE_TOKEN:
				readResourceInstanceCreateToken(false);
				break;
			case RESOURCE_INSTANCE_INITIALIZE_TOKEN:
				readResourceInstanceCreateToken(true);
				break;
			case RESOURCE_INSTANCE_DELETE_TOKEN:
				readResourceInstanceDeleteToken();
				break;
			case SAMPLE_TOKEN:
				readSampleToken();
				break;
			default:
				throw new IOException("Unexpected token byte value " + token);
			}
			return true;
		}
		catch (EOFException ignore)
		{
			return false;
		}
	}
private boolean readToken ( ) throws IOException { byte token ; try { if ( this . updateOK ) { this . dataIn . mark ( BUFFER_SIZE ) ; } token = this . dataIn . readByte ( ) ; switch ( token ) { case HEADER_TOKEN : readHeaderToken ( ) ; break ; case RESOURCE_TYPE_TOKEN : readResourceTypeToken ( ) ; break ; case RESOURCE_INSTANCE_CREATE_TOKEN : readResourceInstanceCreateToken ( false ) ; break ; case RESOURCE_INSTANCE_INITIALIZE_TOKEN : readResourceInstanceCreateToken ( true ) ; break ; case RESOURCE_INSTANCE_DELETE_TOKEN : readResourceInstanceDeleteToken ( ) ; break ; case SAMPLE_TOKEN : readSampleToken ( ) ; break ; default : throw new IOException ( "Unexpected token byte value " + token ) ; } return true ; } catch ( EOFException ignore ) { return false ; } }
@return true if token read, false if eof.