public interface ReceiverOwner extends VariableOwner {
/*
- * The monitor/control is passed to separate ReceivingContorller because:
+ * The monitor/control is passed to separate ReceivingController because:
*
* - possibly some component in the future may need support for streaming to
* multiple Receivers at the same time.
* during the upload.
* <p>
* {@link #onProgress(long, long)} is called in a synchronized block
- * during the content is being received. This is potentially bit slow,
- * so we are calling this method only if requested. The value is
- * requested after the {@link #uploadStarted(ReceivingStartedEvent)}
- * event, but not after each buffer reading.
+ * when the content is being received. This is potentially bit slow, so
+ * we are calling that method only if requested. The value is requested
+ * after the {@link #uploadStarted(ReceivingStartedEvent)} event, but
+ * not after reading each buffer.
*
* @return true if this ReceiverOwner wants to by notified during the
* upload of the progress of streaming.
* Note, the usage of this method is not synchronized over the
* Application instance by the terminal like other methods. The
* implementation should only return a boolean field and especially not
- * to modify UI or implement a synchronization by itself.
+ * modify UI or implement a synchronization by itself.
*
* @return true if the streaming should be interrupted as soon as
* possible.
final char[] charArray = boundary.toCharArray();
/*
- * Reads bytes from the underlaying stream. Compares the read bytes to
+ * Reads bytes from the underlying stream. Compares the read bytes to
* the boundary string and returns -1 if met.
*
- * The maching happens so that if the read byte equals to the first char
- * of boundary string, the stream goes to "buffering mode". In buffering
- * mode bytes are read until the character does not match the
+ * The matching happens so that if the read byte equals to the first
+ * char of boundary string, the stream goes to "buffering mode". In
+ * buffering mode bytes are read until the character does not match the
* corresponding from boundary string or the full boundary string is
* found.
*/
}
fromActualStream = inputStream.read();
if (fromActualStream != charArray[matchedCount]) {
- // Did not found full boundary, cache the last
+ // Did not find full boundary, cache the last
// byte
bufferedByte = fromActualStream;
return getBuffered();
controller.uploadFailed(event);
}
// Note, we are not throwing interrupted exception forward as it is
- // not a terminal level erro like all other exception.
+ // not a terminal level error like all other exception.
} catch (final Exception e) {
synchronized (application) {
ReceivingFailedEvent event = new ReceivingFailedEventImpl(
InvalidUIDLSecurityKeyException {
/*
- * URI pattern: APP/UPPLOAD/[PID]/[NAME]/[SECKEY] See #createReceiverUrl
+ * URI pattern: APP/UPLOAD/[PID]/[NAME]/[SECKEY] See #createReceiverUrl
*/
String pathInfo = request.getPathInfo();
* We will use the same APP/* URI space as ApplicationResources but
* prefix url with UPLOAD
*
- * eg. APP/UPPLOAD/[PID]/[NAME]/[SECKEY]
+ * eg. APP/UPLOAD/[PID]/[NAME]/[SECKEY]
*
* SECKEY is created on each paint to make URL's unpredictable (to
* prevent CSRF attacks).
*/
private ProxyReceiver proxyReceiver = new ProxyReceiver();
private boolean interrupted = false;
- private Html5FileUploadListener listener;;
+ private Html5FileUploadListener listener;
public String getFileName() {
return name;
/**
* Sets the {@link Receiver} that into which the file contents will be
- * written. Usage of Reveiver is similar to {@link Upload} component.
+ * written. Usage of Receiver is similar to {@link Upload} component.
* <p>
* If the {@link Receiver} is not set in the {@link DropHandler} the file
* contents will not be sent to server.
* <p>
* <em>Note!</em> receiving file contents is experimental feature depending
- * on HTML 5 API's. It is supported only by modern web brosers like Firefox
+ * on HTML 5 API's. It is supported only by modern web browsers like Firefox
* 3.6 and above and recent webkit based browsers (Safari 5, Chrome 6) at
* this time.
*