@@ -61,44 +61,44 @@ public class Blob extends HtmlUnitScriptable {
6161 /**
6262 * The backend used for saving the blob.
6363 */
64- protected abstract static class Backend implements Serializable {
64+ protected interface Backend extends Serializable {
6565
6666 /**
6767 * Returns the name.
6868 *
6969 * @return the name
7070 */
71- abstract String getName ();
71+ String getName ();
7272
7373 /**
7474 * Returns the last modified timestamp as long.
7575 *
7676 * @return the last modified timestamp as long
7777 */
78- abstract long getLastModified ();
78+ long getLastModified ();
7979
8080 /**
8181 * Returns the size.
8282 *
8383 * @return the size
8484 */
85- abstract long getSize ();
85+ long getSize ();
8686
8787 /**
8888 * Returns the type.
8989 *
9090 * @param browserVersion the {@link BrowserVersion}
9191 * @return the type
9292 */
93- abstract String getType (BrowserVersion browserVersion );
93+ String getType (BrowserVersion browserVersion );
9494
9595 /**
9696 * Returns the text.
9797 *
9898 * @return the text
9999 * @throws IOException in case of error
100100 */
101- abstract String getText () throws IOException ;
101+ String getText () throws IOException ;
102102
103103 /**
104104 * Returns the bytes.
@@ -107,14 +107,7 @@ protected abstract static class Backend implements Serializable {
107107 * @param end the end position
108108 * @return the bytes
109109 */
110- abstract byte [] getBytes (int start , int end );
111-
112- /**
113- * Ctor.
114- */
115- Backend () {
116- // to make it package protected
117- }
110+ byte [] getBytes (int start , int end );
118111
119112 /**
120113 * Returns the KeyDataPair for this Blob/File.
@@ -124,14 +117,14 @@ protected abstract static class Backend implements Serializable {
124117 * @param contentType the content type
125118 * @return the KeyDataPair to hold the data
126119 */
127- abstract KeyDataPair getKeyDataPair (String name , String fileName , String contentType );
120+ KeyDataPair getKeyDataPair (String name , String fileName , String contentType );
128121 }
129122
130123 /**
131124 * Implementation of the {@link Backend} that stores the bytes in memory.
132125 *
133126 */
134- protected static class InMemoryBackend extends Backend {
127+ protected static class InMemoryBackend implements Backend {
135128 private final String fileName_ ;
136129 private final String type_ ;
137130 private final long lastModified_ ;
0 commit comments