Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
910 B
1
Indexable
Never
package com.hamedshahidi.wordfrequencyapp.models;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import jakarta.servlet.http.Part;

public class WordFrequencyRequest {

    private String text;
    private int k;
    private Part filePart;

    public Part getFilePart() {
        return filePart;
    }

    public void setFilePart(Part filePart) {
        this.filePart = filePart;
    }

    public WordFrequencyRequest(String text, int k) {
        this.text = text;
        this.k = k;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getK() {
        return k;
    }

    public void setK(int k) {
        this.k = k;
    }

    public InputStream getInputStream() {
        return new ByteArrayInputStream(text.getBytes());
    }

}