jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
121 return !parsed; |
121 return !parsed; |
122 } |
122 } |
123 |
123 |
124 @Override |
124 @Override |
125 public MIMEEvent next() { |
125 public MIMEEvent next() { |
|
126 |
|
127 if (parsed) { |
|
128 throw new NoSuchElementException(); |
|
129 } |
|
130 |
126 switch(state) { |
131 switch(state) { |
127 case START_MESSAGE : |
132 case START_MESSAGE : |
128 if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_MESSAGE);} |
133 if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_MESSAGE);} |
129 state = STATE.SKIP_PREAMBLE; |
134 state = STATE.SKIP_PREAMBLE; |
130 return MIMEEvent.START_MESSAGE; |
135 return MIMEEvent.START_MESSAGE; |