private long 
	getNumberFromStream(
		BDecoderInputStream 	dbis, 
		char 					parseChar) 

		throws IOException 
	{
		final char[]	chars = new char[32];

		int tempByte = dbis.read();

		int pos = 0;

		while ((tempByte != parseChar) && (tempByte >= 0)) {
			chars[pos++] = (char)tempByte;
			if ( pos == chars.length ){
				throw( new NumberFormatException( "Number too large: " + new String(chars,0,pos) + "..." ));
			}
			tempByte = dbis.read();
		}

		//are we at the end of the stream?

		if (tempByte < 0) {

			return -1;

		}else if ( pos == 0 ){
			// support some borked impls that sometimes don't bother encoding anything

			return(0);
		}

		return( parseLong( chars, 0, pos ));
	}