Example usage for org.eclipse.jgit.lib Constants encode

List of usage examples for org.eclipse.jgit.lib Constants encode

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib Constants encode.

Prototype

public static byte[] encode(String str) 

Source Link

Document

Convert a string to a byte array in the standard character encoding.

Usage

From source file:org.kuali.student.git.model.tree.JGitTreeData.java

License:Educational Community License

private byte[] getByteName(String name, FileMode fileMode) {

    StringBuilder nameBuilder = new StringBuilder(name);

    if (fileMode == FileMode.TREE)
        nameBuilder.append("/");

    return Constants.encode(nameBuilder.toString());

}