@@ -92,72 +92,158 @@ class FilenameUtil {
92
92
private int endIndex ;
93
93
private int startIndex ;
94
94
95
- FilenameUtil () {
95
+ /**
96
+ * Default constructor
97
+ */
98
+ public FilenameUtil () {
96
99
}
97
100
98
101
/**
99
102
* Ensures that path exists. If not, make it.
100
103
*
101
104
* @param path
102
- * the path of the to be stored file.
105
+ * the path of the to be stored file
103
106
*/
104
107
public void ensurePathExists (final File path ) {
105
108
final File parent = path .getAbsoluteFile ().getParentFile ();
106
109
parent .mkdirs ();
107
110
}
108
111
112
+ /**
113
+ * Sets the encoding used to open the resource.
114
+ *
115
+ * @param encoding
116
+ * new encoding
117
+ */
109
118
public void setEncoding (final String encoding ) {
110
119
this .encoding = encoding ;
111
120
}
112
121
122
+ /**
123
+ * Returns the encoding used to open the resource.
124
+ *
125
+ * @return current default setting
126
+ */
113
127
public String getEncoding () {
114
128
return encoding ;
115
129
}
116
130
131
+ /**
132
+ * Sets the suffix of the files.
133
+ *
134
+ * @param fileSuffix
135
+ * the suffix of the files
136
+ */
117
137
public void setFileSuffix (final String fileSuffix ) {
118
138
this .fileSuffix = fileSuffix ;
119
139
}
120
140
141
+ /**
142
+ * Gets the suffix of the file.
143
+ *
144
+ * @return the suffix of the file
145
+ */
121
146
public String getFileSuffix () {
122
147
return fileSuffix ;
123
148
}
124
149
150
+ /**
151
+ * Sets the filename.
152
+ *
153
+ * @param filename
154
+ * the name of the file
155
+ */
125
156
public void setFilename (final String filename ) {
126
157
this .filename = filename ;
127
158
}
128
159
160
+ /**
161
+ * Gets the filename.
162
+ *
163
+ * @return the name of the file
164
+ *
165
+ */
129
166
public String getFilename () {
130
167
return filename ;
131
168
}
132
169
170
+ /**
171
+ * Sets the property which is used as the base of the filename.
172
+ * Recommended properties are identifiers.
173
+ *
174
+ * @param property
175
+ * the property which will be used for the base name of the file
176
+ */
133
177
public void setProperty (final String property ) {
134
178
this .property = property ;
135
179
}
136
180
181
+ /**
182
+ * Gets the property which is the base of the filename.
183
+ *
184
+ * @return the property which is the base name of the file
185
+ */
137
186
public String getProperty () {
138
187
return property ;
139
188
}
140
189
190
+ /**
191
+ * Sets the target path.
192
+ *
193
+ * @param target
194
+ * the basis directory in which the files are stored
195
+ */
141
196
public void setTarget (final String target ) {
142
197
this .target = target ;
143
198
}
144
199
200
+ /**
201
+ * Gets the target path.
202
+ *
203
+ * @return the basis directory in which the files are stored
204
+ */
145
205
public String getTarget () {
146
206
return target ;
147
207
}
148
208
209
+ /**
210
+ * Sets the end of the index in the filename to extract the name of a
211
+ * subfolder.
212
+ *
213
+ * @param endIndex
214
+ * this marks the index' end
215
+ */
149
216
public void setEndIndex (final int endIndex ) {
150
217
this .endIndex = endIndex ;
151
218
}
152
219
220
+ /**
221
+ * Gets the end of the index in the filename to extract the name of a
222
+ * subfolder.
223
+ *
224
+ * @return the marker of the index' end
225
+ */
153
226
public int getEndIndex () {
154
227
return endIndex ;
155
228
}
156
229
230
+ /**
231
+ * Sets the beginning of the index in the filename to extract the name of
232
+ * the subfolder.
233
+ *
234
+ * @param startIndex
235
+ * This marks the index' beginning
236
+ */
157
237
public void setStartIndex (final int startIndex ) {
158
238
this .startIndex = startIndex ;
159
239
}
160
240
241
+ /**
242
+ * Gets the beginning of the index in the filename to extract the name of
243
+ * the subfolder.
244
+ *
245
+ * @return the marker of the index' beginning
246
+ */
161
247
public int getStartIndex () {
162
248
return startIndex ;
163
249
}
0 commit comments