@@ -939,15 +939,24 @@ public GHContent getReadme() throws Exception {
939939 return getFileContent ("readme" );
940940 }
941941
942- public GHContentUpdateResponse createContent (String content , String commitMessage , String path ) throws IOException {
943- return createContent (content , commitMessage , path , null );
942+
943+ public GHContentUpdateResponse createContent (String content , String commitMessage , String path ) throws IOException {
944+ return createContent (content .getBytes (), commitMessage , path , null );
945+ }
946+
947+ public GHContentUpdateResponse createContent (String content , String commitMessage , String path , String branch ) throws IOException {
948+ return createContent (content .getBytes (), commitMessage , path , branch );
949+ }
950+
951+ public GHContentUpdateResponse createContent (byte [] contentBytes , String commitMessage , String path ) throws IOException {
952+ return createContent (contentBytes , commitMessage , path , null );
944953 }
945954
946- public GHContentUpdateResponse createContent (String content , String commitMessage , String path , String branch ) throws IOException {
955+ public GHContentUpdateResponse createContent (byte [] contentBytes , String commitMessage , String path , String branch ) throws IOException {
947956 Requester requester = new Requester (root )
948957 .with ("path" , path )
949958 .with ("message" , commitMessage )
950- .with ("content" , DatatypeConverter .printBase64Binary (content . getBytes () ))
959+ .with ("content" , DatatypeConverter .printBase64Binary (contentBytes ))
951960 .method ("PUT" );
952961
953962 if (branch != null ) {
0 commit comments