/** * This is used to determine whether the terminal token read is * the final terminal token. The final terminal token is a * normal terminal token, however it ends with two hyphens and * a carriage return line feed, this ends the part list. * * @return true if this was the last part within the list */ public boolean isEnd() { return boundary.isEnd(); } }
/** * This is used to determine whether the terminal token read is * the final terminal token. The final terminal token is a * normal terminal token, however it ends with two hyphens and * a carriage return line feed, this ends the part list. * * @return true if this was the last part within the list */ public boolean isEnd() { return boundary.isEnd(); } }
/** * This is used to determine whether the terminal token read is * the final terminal token. The final terminal token is a * normal terminal token, however it ends with two hyphens and * a carriage return line feed, this ends the part list. * * @return true if this was the last part within the list */ public boolean isEnd() { return boundary.isEnd(); } }
/** * This is used to determine whether the part body has been read * from the cursor successfully. In order to determine if all of * the bytes have been read successfully this will check to see * of the terminal token had been consumed. * * @return true if the part body and terminal have been read */ public boolean isFinished() { if(boundary.isEnd()) { return true; } return consumer.isFinished(); }
/** * This is used to determine whether the part body has been read * from the cursor successfully. In order to determine if all of * the bytes have been read successfully this will check to see * of the terminal token had been consumed. * * @return true if the part body and terminal have been read */ public boolean isFinished() { if(boundary.isEnd()) { return true; } return consumer.isFinished(); }
/** * This is used to determine whether the part body has been read * from the cursor successfully. In order to determine if all of * the bytes have been read successfully this will check to see * of the terminal token had been consumed. * * @return true if the part body and terminal have been read */ public boolean isFinished() { if(boundary.isEnd()) { return true; } return consumer.isFinished(); }
/** * This is used to consume the part body from the cursor. This * initially reads the body of the part, which represents the * actual content exposed via the <code>Part</code> interface * once the content has been consumed the terminal is consumed. * * @param cursor this is the cursor to consume the body from */ public void consume(Cursor cursor) throws IOException { while(cursor.isReady()) { if(!boundary.isFinished()) { boundary.consume(cursor); } else { if(consumer.isFinished()) { break; } if(boundary.isEnd()) { break; } consumer.consume(cursor); } } }
/** * This is used to consume the part body from the cursor. This * initially reads the body of the part, which represents the * actual content exposed via the <code>Part</code> interface * once the content has been consumed the terminal is consumed. * * @param cursor this is the cursor to consume the body from */ public void consume(ByteCursor cursor) throws IOException { while(cursor.isReady()) { if(!boundary.isFinished()) { boundary.consume(cursor); } else { if(consumer.isFinished()) { break; } if(boundary.isEnd()) { break; } consumer.consume(cursor); } } }
/** * This is used to consume the part body from the cursor. This * initially reads the body of the part, which represents the * actual content exposed via the <code>Part</code> interface * once the content has been consumed the terminal is consumed. * * @param cursor this is the cursor to consume the body from */ public void consume(ByteCursor cursor) throws IOException { while(cursor.isReady()) { if(!boundary.isFinished()) { boundary.consume(cursor); } else { if(consumer.isFinished()) { break; } if(boundary.isEnd()) { break; } consumer.consume(cursor); } } }