diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java index e049bd8f37..2d954424fc 100644 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java +++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,13 +17,14 @@ package org.springframework.integration.ftp.session; import org.apache.commons.net.ftp.FTPFile; + import org.springframework.integration.file.remote.AbstractFileInfo; import org.springframework.integration.file.remote.FileInfo; import org.springframework.util.Assert; /** * A {@link FileInfo} implementation for FTP/FTPS. - * + * * @author Gary Russell * @since 2.1 */ @@ -36,28 +37,34 @@ public class FtpFileInfo extends AbstractFileInfo { this.ftpFile = ftpFile; } + @Override public boolean isDirectory() { return this.ftpFile.isDirectory(); } + @Override public boolean isLink() { return this.ftpFile.isSymbolicLink(); } + @Override public long getSize() { return this.ftpFile.getSize(); } + @Override public long getModified() { return this.ftpFile.getTimestamp().getTimeInMillis(); } + @Override public String getFilename() { return this.ftpFile.getName(); } + @Override public String getPermissions() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (this.ftpFile.isDirectory()) { sb.append("d"); } else if (this.ftpFile.isSymbolicLink()) { @@ -113,6 +120,7 @@ public class FtpFileInfo extends AbstractFileInfo { return sb.toString(); } + @Override public FTPFile getFileInfo() { return this.ftpFile; }