You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @deprecated uses a constant string. Rather use {@link #getPartBoundary}
123
-
*/
124
-
publicstaticStringgetBoundary() {
125
-
returnBOUNDARY;
126
-
}
127
-
128
-
/**
129
-
* The ASCII bytes to use as the multipart boundary.
130
-
*/
131
-
privatebyte[] boundaryBytes;
132
-
133
108
/**
134
109
* Return the name of this part.
135
110
*
@@ -165,31 +140,6 @@ public static String getBoundary() {
165
140
*/
166
141
publicabstractStringgetContentId();
167
142
168
-
/**
169
-
* Gets the part boundary to be used.
170
-
*
171
-
* @return the part boundary as an array of bytes.
172
-
* @since 3.0
173
-
*/
174
-
protectedbyte[] getPartBoundary() {
175
-
if (boundaryBytes == null) {
176
-
// custom boundary bytes have not been set, use the default.
177
-
returnDEFAULT_BOUNDARY_BYTES;
178
-
} else {
179
-
returnboundaryBytes;
180
-
}
181
-
}
182
-
183
-
/**
184
-
* Sets the part boundary. Only meant to be used by {@link Part#sendParts(java.io.OutputStream, Part[], byte[])} and {@link Part#getLengthOfParts(Part[], byte[])}
185
-
*
186
-
* @param boundaryBytes An array of ASCII bytes.
187
-
* @since 3.0
188
-
*/
189
-
voidsetPartBoundary(byte[] boundaryBytes) {
190
-
this.boundaryBytes = boundaryBytes;
191
-
}
192
-
193
143
/**
194
144
* Tests if this part can be sent more than once.
195
145
*
@@ -204,15 +154,16 @@ public boolean isRepeatable() {
204
154
* Write the start to the specified output stream
205
155
*
206
156
* @param out The output stream
157
+
* @param boundary the boundary
207
158
* @throws java.io.IOException If an IO problem occurs.
0 commit comments