@@ -60,6 +60,7 @@ public OneFileAttributeAttachedToRoot(
6060 }
6161
6262
63+ @ Override
6364 public String [] children (String f ) {
6465 return super .children (f );
6566 }
@@ -69,6 +70,7 @@ public String[] children(String f) {
6970 * @param attrName name of the attribute
7071 * @return appropriate (serializable) value or <CODE>null</CODE> if the attribute is unset (or could not be properly restored for some reason)
7172 */
73+ @ Override
7274 public Object readAttribute (String name , String attrName ) {
7375 return super .readAttribute (transformName (name ), attrName );
7476 }
@@ -79,6 +81,7 @@ public Object readAttribute(String name, String attrName) {
7981 * @param value new value or <code>null</code> to clear the attribute. Must be serializable, although particular filesystems may or may not use serialization to store attribute values.
8082 * @exception IOException if the attribute cannot be set. If serialization is used to store it, this may in fact be a subclass such as {@link NotSerializableException}.
8183 */
84+ @ Override
8285 public void writeAttribute (String name , String attrName , Object value )
8386 throws IOException {
8487 super .writeAttribute (transformName (name ), attrName , value );
@@ -88,6 +91,7 @@ public void writeAttribute(String name, String attrName, Object value)
8891 * @param name the file
8992 * @return enumeration of keys (as strings)
9093 */
94+ @ Override
9195 public synchronized Enumeration <String > attributes (String name ) {
9296 return super .attributes (transformName (name ));
9397 }
@@ -97,6 +101,7 @@ public synchronized Enumeration<String> attributes(String name) {
97101 * @param oldName old name of the file
98102 * @param newName new name of the file
99103 */
104+ @ Override
100105 public synchronized void renameAttributes (String oldName , String newName ) {
101106 super .renameAttributes (transformName (oldName ), transformName (newName ));
102107 }
@@ -105,22 +110,23 @@ public synchronized void renameAttributes(String oldName, String newName) {
105110 *
106111 * @param name name of the file
107112 */
113+ @ Override
108114 public synchronized void deleteAttributes (String name ) {
109115 super .deleteAttributes (transformName (name ));
110116 }
111117
112118 private String transformName (String name ) {
113119 char replaceChar = '|' ;//NOI18N
114120 if (name .indexOf (replaceChar ) != -1 ) {
115- StringBuffer transformed = new StringBuffer (name .length () + 50 );
121+ StringBuilder transformed = new StringBuilder (name .length () + 50 );
116122 for (int i = 0 ; i < name .length (); i ++) {
117123 transformed .append (name .charAt (i ));
118124 if (name .charAt (i ) == replaceChar )
119125 transformed .append (replaceChar );
120126 }
121127 name = transformed .toString ();
122128 }
123- return name .replace ('/' ,replaceChar );//NOI18N
129+ return name .replace ('/' , replaceChar );//NOI18N
124130 }
125131 }
126132}
0 commit comments